Output. ... .Tracing.CheckPreviousRecordOfSingleWM(.) cleanup : E28 is used everywhere : fixed

This commit is contained in:
Milan Hanajik
2019-05-16 13:35:11 +02:00
parent 156215bea6
commit 53795db720
2 changed files with 9 additions and 6 deletions
@@ -280,8 +280,9 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
if (string.IsNullOrEmpty(wm.SerialNr))
{
/// S/N is missing
wm.ProcessId = 0;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28; /// Reset E28 (it is an RFID comm. error, not production tracing error)
return Retv.OK;
}
@@ -310,9 +311,9 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
if (results.Count == 0)
{
/// No records found => IsLastRecordOk = false
/// No records found
wm.ProcessId = 0;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28; /// Set E28
return Retv.OK;
}
@@ -367,13 +368,15 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
verifyReferencePart = vRP;
}
wm.ProcessId = currentProcess.Id;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28; /// Set E28 (default if no record fits requirements)
foreach (var rslt in results)
{
if ((verifiedWorkstep.Id == (int)rslt[1]) && (processId == (int)rslt[2]))
{
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28;
/// This record fits verification requirements
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28; /// Reset E28
break;
}
}