TBF : iPerl : Two bug fixes : (1) checking previous records, (2) evaluating MaxProefindex

This commit is contained in:
Milan Hanajik
2019-06-19 15:31:56 +02:00
parent 59eb1902f7
commit b873dd5bf5
3 changed files with 10 additions and 10 deletions
@@ -266,7 +266,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
Results.Entities.WaterMeter wm = waterMeters[i];
if ((wm != null) && !wm.Disabled && !string.IsNullOrEmpty(wm.SerialNr))
if ((wm != null) && !wm.Disabled)
{
CheckPreviousRecordOfSingleWM(session, wm);
}
@@ -284,7 +284,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
/// S/N is missing
wm.ProcessId = 0;
wm.IsLastRecordOk = true; /// OK, this is an RFID comm. error, not a production tracing error
wm.LastRecordIsNok = false; /// OK, this is an RFID comm. error, not a production tracing error
return Retv.OK;
}
@@ -315,7 +315,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
/// No records found
wm.ProcessId = 0;
wm.IsLastRecordOk = false; /// NOK
wm.LastRecordIsNok = true; /// NOK
///
return Retv.OK;
}
@@ -373,13 +373,13 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
wm.ProcessId = currentProcess.Id;
wm.IsLastRecordOk = false; /// NOK (=default if no matching record found)
wm.LastRecordIsNok = true; /// NOK (=default if no matching record found)
foreach (var rslt in results)
{
if ((verifiedWorkstep.Id == (int)rslt[1]) && (processId == (int)rslt[2]))
{
/// This record fits verification requirements
wm.IsLastRecordOk = true; /// OK
wm.LastRecordIsNok = false; /// OK
break;
}
}