Output.ProductionTracing.Tracing.CheckPreviousRecordOfSingleWM(.) cleanup : E28 is used everywhere, ver. 2.18.1225

This commit is contained in:
Milan Hanajik 2019-05-13 08:18:42 +02:00
parent d51edbfbfe
commit 3075169fd1
6 changed files with 31 additions and 33 deletions

View File

@ -96,7 +96,6 @@ 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,7 +357,7 @@ namespace Results.Entities
CompleteTestInfos = null;
#endif
ProcessId = 0;
IsLastRecordOk = false;
ErrorFlags = 0;
}
@ -417,7 +416,6 @@ namespace Results.Entities
CompleteTestInfos = src.CompleteTestInfos;
#endif
ProcessId = src.ProcessId;
IsLastRecordOk = src.IsLastRecordOk;
foreach (var mtr in MeterTestRslts)
{

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.18.1213.0")]
[assembly: AssemblyFileVersion("2.18.1213.0")]
[assembly: AssemblyVersion("2.18.1224.0")]
[assembly: AssemblyFileVersion("2.18.1224.0")]

View File

@ -454,27 +454,27 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).Passed)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagsStr())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlagsEx, Strings.Error_flags + "Ex", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ErrorFlagsStrEx())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0001) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E2, "E2 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0002) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E3, "E3 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0004) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E4, "E4 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0008) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E5, "E5 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0010) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E6, "E6 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0020) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E7, "E7 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0040) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E8, "E8 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0080) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E9, "E9 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0100) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E10, "E10 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0200) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E11, "E11 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0400) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E12, "E12 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0800) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E13, "E13 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x1000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E14, "E14 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x2000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E21, "E21 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x100000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E25, "E25 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x1000000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E26, "E26 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x2000000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E27, "E27 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E28, "E28 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E1) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E2, "E2 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E2) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E3, "E3 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E3) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E4, "E4 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E4) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E5, "E5 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E5) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E6, "E6 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E6) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E7, "E7 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E7) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E8, "E8 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E8) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E9, "E9 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E9) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E10, "E10 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E10) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E11, "E11 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E11) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E12, "E12 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E12) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E13, "E13 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E13) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E14, "E14 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E14) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E15) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E16) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E21, "E21 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E21) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E25, "E25 ()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => ((w.ErrorFlags & (int)ErrorFlagMask.E25) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E26, "E26 ()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => ((w.ErrorFlags & (int)ErrorFlagMask.E26) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E27, "E27 ()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => ((w.ErrorFlags & (int)ErrorFlagMask.E27) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E28, "E28 ()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => ((w.ErrorFlags & (int)ErrorFlagMask.E28) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPartStr, "Test part str.", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatEnum(f, (w.GetMeterTestRslt(t) != null) ? w.GetMeterTestRslt(t).TestRslt.Part : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_row_nr, "Table row #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableRowNr.ToString() : string.Format(f, TableRowNr)));

View File

@ -281,7 +281,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
if (string.IsNullOrEmpty(wm.SerialNr))
{
wm.ProcessId = 0;
wm.IsLastRecordOk = true;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28;
return Retv.OK;
}
@ -312,7 +312,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
{
/// No records found => IsLastRecordOk = false
wm.ProcessId = 0;
wm.IsLastRecordOk = false;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28;
return Retv.OK;
}
@ -368,12 +368,12 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
}
wm.ProcessId = currentProcess.Id;
wm.IsLastRecordOk = false;
wm.ErrorFlags &= ~(int)Config.Entities.ErrorFlagMask.E28;
foreach (var rslt in results)
{
if ((verifiedWorkstep.Id == (int)rslt[1]) && (processId == (int)rslt[2]))
{
wm.IsLastRecordOk = true;
wm.ErrorFlags |= (int)Config.Entities.ErrorFlagMask.E28;
break;
}
}

View File

@ -165,7 +165,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
if (arg.ToLower() == "prevworkstep")
{
if (!wm.IsLastRecordOk)
if ((wm.ErrorFlags & (int)Config.Entities.ErrorFlagMask.E28) != 0)
{
anyErrorOfThisMeter = true;
message += string.Format("iPerl{0} : Predchádzajúci krok nebol zaznamenaný{1}", wm.WMPosition, Environment.NewLine);

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1219.0")]
[assembly: AssemblyFileVersion("2.18.1219.0")]
[assembly: AssemblyVersion("2.18.1225.0")]
[assembly: AssemblyFileVersion("2.18.1225.0")]