Added new Nummer Result - Failed_meters_countE15
This commit is contained in:
parent
3a2290570d
commit
3f07a506ad
@ -181,6 +181,18 @@ namespace Results.Entities
|
||||
return WaterMeters.Count - PassedMetersCount();
|
||||
}
|
||||
|
||||
|
||||
public virtual int PassedMetersCountE15()
|
||||
{
|
||||
int count = 0;
|
||||
foreach (var mtr in WaterMeters) if (mtr.PassedFromTestsE15()) count++;
|
||||
return count;
|
||||
}
|
||||
public virtual int FailedMetersCountE15()
|
||||
{
|
||||
return WaterMeters.Count - PassedMetersCountE15();
|
||||
}
|
||||
|
||||
public virtual long ErrorFlags()
|
||||
{
|
||||
long result = 0;
|
||||
|
||||
@ -189,6 +189,12 @@ namespace Results.Entities
|
||||
{
|
||||
return ErrorFlagsFromTests() | ErrorFlags;
|
||||
}
|
||||
|
||||
public virtual long ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask errorFlagsQuestion)
|
||||
{
|
||||
long errorFlagsMask = (long)errorFlagsQuestion;
|
||||
return ErrorFlagsFromTests() & errorFlagsMask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert combined errorFlags of all tests to string
|
||||
@ -270,6 +276,24 @@ namespace Results.Entities
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
public virtual bool PassedFromTestsE15()
|
||||
{
|
||||
//TODO BUMI this will just let us is E15
|
||||
bool passed = (ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask.E15) == 0);
|
||||
|
||||
//TODO BUMI Check This may be not needed ?
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.Evaluate() && (!mtr.TestDone))
|
||||
{
|
||||
passed = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Three state test results and/or water meter result (Algeria PT25 requirement).
|
||||
|
||||
@ -349,6 +349,8 @@ namespace Results
|
||||
Pulses_main, /// 295 Compound main meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
||||
Pulses_aux, /// 296 Compound aux meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
||||
|
||||
Failed_meters_countE15, /// 297
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,6 +408,7 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_countE15, Strings.Failed_meters_count + "E15", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCountE15())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_seals_count, "Seals count of passed meters", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount() * int.Parse(w.WaterMeterData.Text5))));
|
||||
|
||||
/// Extra water meter data
|
||||
|
||||
Loading…
Reference in New Issue
Block a user