ProductionTracing : wm.IsLastErrorOk used again, ErrorFlags bit E28 set in iPerlCheck appropriately, ver. 2.18.1235

This commit is contained in:
Milan Hanajik
2019-05-23 10:30:28 +02:00
parent bbcbee894d
commit 47b6bb4cf7
4 changed files with 16 additions and 7 deletions
+3
View File
@@ -96,6 +96,7 @@ namespace Results.Entities
public virtual object CompleteTestInfos { get; set; } /// SensusTestInfo[] obtained as a best match at the beginning of the cycle, not mapped to DB !!!
#endif
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
public virtual bool IsLastRecordOk { get; set; } /// Not mapped to DB !!! Previous record verification result
public virtual WaterMeterData WaterMeterData { get; set; }
public virtual Batch Batch { get; set; }
@@ -358,6 +359,7 @@ namespace Results.Entities
#endif
ProcessId = 0;
ErrorFlags = 0;
IsLastRecordOk = false;
}
@@ -416,6 +418,7 @@ namespace Results.Entities
CompleteTestInfos = src.CompleteTestInfos;
#endif
ProcessId = src.ProcessId;
IsLastRecordOk = src.IsLastRecordOk;
foreach (var mtr in MeterTestRslts)
{
@@ -264,7 +264,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
Results.Entities.WaterMeter wm = waterMeters[i];
if ((wm != null) && !string.IsNullOrEmpty(wm.SerialNr))
if ((wm != null) && !wm.Disabled && !string.IsNullOrEmpty(wm.SerialNr))
{
CheckPreviousRecordOfSingleWM(session, wm);
}
@@ -282,7 +282,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
/// S/N is missing
wm.ProcessId = 0;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28; /// Reset E28 (it is an RFID comm. error, not production tracing error)
wm.IsLastRecordOk = true; /// OK, this is an RFID comm. error, not a production tracing error
return Retv.OK;
}
@@ -313,7 +313,8 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
/// No records found
wm.ProcessId = 0;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28; /// Set E28
wm.IsLastRecordOk = false; /// NOK
///
return Retv.OK;
}
@@ -370,13 +371,13 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
wm.ProcessId = currentProcess.Id;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28; /// Set E28 (default if no record fits requirements)
wm.IsLastRecordOk = false; /// 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.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28; /// Reset E28
wm.IsLastRecordOk = true; /// OK
break;
}
}
@@ -165,6 +165,11 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
if (arg.ToLower() == "prevworkstep")
{
if (!wm.IsLastRecordOk)
{
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28; /// Set E28
}
if ((wm.ErrorFlags & (int)Config.Entities.ErrorFlagMask.E28) != 0)
{
anyErrorOfThisMeter = true;
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1229.0")]
[assembly: AssemblyFileVersion("2.18.1229.0")]
[assembly: AssemblyVersion("2.18.1235.0")]
[assembly: AssemblyFileVersion("2.18.1235.0")]