TestData.IsFromToInPct and TestRslt.Qdetected added, TestRslt.Qfrom() / Qto() rewritten, CombinedWithDetectionSeq bug fix.
This commit is contained in:
parent
990b695db6
commit
c4c86b36d2
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2016-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -18,8 +18,9 @@ namespace Results.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual double Qtg { get; set; } /// [m3/h] flow range low limit
|
||||
public virtual double Qfrom { get; set; } /// [m3/h] flow range low limit
|
||||
public virtual double Qto { get; set; } /// [m3/h] flow range high limit
|
||||
public virtual double Qfrom { get; set; } /// [m3/h] or [%] flow range low limit
|
||||
public virtual double Qto { get; set; } /// [m3/h] or [%] flow range high limit
|
||||
public virtual bool IsFromToInPct { get; set; } /// true: Qfrom and Qto are in % of Qtg, false: Qfrom and Qto are in [m3/h]
|
||||
public virtual double TargetVolume { get; set; } /// [l] target test volume
|
||||
public virtual double TargetTime { get; set; } /// [s] target test time
|
||||
public virtual string Method { get; set; }
|
||||
@ -48,8 +49,9 @@ namespace Results.Entities
|
||||
Name = test.Name;
|
||||
Repeats = test.Repeats;
|
||||
Qtg = test.Qtg;
|
||||
Qfrom = test.QfromM3ph();
|
||||
Qto = test.QtoM3ph();
|
||||
Qfrom = test.Qfrom;
|
||||
Qto = test.Qto;
|
||||
IsFromToInPct = test.IsFromToInPct;
|
||||
TargetVolume = test.Volume;
|
||||
TargetTime = test.TestTime;
|
||||
Method = test.Method;
|
||||
@ -73,6 +75,7 @@ namespace Results.Entities
|
||||
Qtg = oriTestData.Qtg;
|
||||
Qfrom = oriTestData.Qfrom;
|
||||
Qto = oriTestData.Qto;
|
||||
IsFromToInPct = oriTestData.IsFromToInPct;
|
||||
TargetVolume = oriTestData.TargetVolume;
|
||||
TargetTime = oriTestData.TargetTime;
|
||||
Method = oriTestData.Method;
|
||||
@ -99,6 +102,7 @@ namespace Results.Entities
|
||||
if (Qtg != td.Qtg) return false;
|
||||
if (Qfrom != td.Qfrom) return false;
|
||||
if (Qto != td.Qto) return false;
|
||||
if (IsFromToInPct != td.IsFromToInPct) return false;
|
||||
if (TargetVolume != td.TargetVolume) return false;
|
||||
if (TargetTime != td.TargetTime) return false;
|
||||
if (Method != td.Method) return false;
|
||||
@ -141,6 +145,7 @@ namespace Results.Entities
|
||||
writer.Write(Qtg);
|
||||
writer.Write(Qfrom);
|
||||
writer.Write(Qto);
|
||||
writer.Write(IsFromToInPct);
|
||||
writer.Write(TargetVolume);
|
||||
writer.Write(TargetTime);
|
||||
writer.Write((Method != null) ? Method : string.Empty);
|
||||
@ -162,6 +167,7 @@ namespace Results.Entities
|
||||
Qtg = reader.ReadDouble();
|
||||
Qfrom = reader.ReadDouble();
|
||||
Qto = reader.ReadDouble();
|
||||
IsFromToInPct = reader.ReadBoolean();
|
||||
TargetVolume = reader.ReadDouble();
|
||||
TargetTime = reader.ReadDouble();
|
||||
Method = reader.ReadString();
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using Common;
|
||||
|
||||
@ -44,7 +43,7 @@ namespace Results.Entities
|
||||
public virtual double DensityLine { get; set; } /// [kg/m3]
|
||||
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
||||
public virtual double MassOfEvapWater { get; set; } /// [kg]
|
||||
public virtual double SpareDbl { get; set; }
|
||||
public virtual double Qdetected { get; set; }
|
||||
public virtual double Flow { get; set; } /// [m3/h] calculated from conventional true value
|
||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||
@ -150,9 +149,21 @@ namespace Results.Entities
|
||||
public virtual string Name() { return Common.Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
||||
public virtual string Key() { return string.Format("{0}~{1}~{2}~{3}", TestData.Name, Part, TestData.Repeats, RepetitionNr); } /// Unique key
|
||||
public virtual int Repeats() { return TestData.Repeats; }
|
||||
public virtual double Qfrom() { return TestData.Qfrom; }
|
||||
public virtual double Qto() { return TestData.Qto; }
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double Qfrom()
|
||||
{
|
||||
return (TestData == null) ? 0
|
||||
: !TestData.IsFromToInPct ? TestData.Qfrom
|
||||
: (TestData.Qtg >= 0) ? TestData.Qfrom * TestData.Qtg / 100
|
||||
: TestData.Qfrom * Qdetected / 100;
|
||||
}
|
||||
public virtual double Qto()
|
||||
{
|
||||
return (TestData == null) ? 0
|
||||
: !TestData.IsFromToInPct ? TestData.Qto
|
||||
: (TestData.Qtg >= 0) ? TestData.Qto * TestData.Qtg / 100
|
||||
: TestData.Qto * Qdetected / 100;
|
||||
}
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double TargetTime() { return TestData.TargetTime; }
|
||||
public virtual string Method() { return TestData.Method; }
|
||||
public virtual string RefFlowmeter() { return (Components != null && Components.Flowmeter != null) ? Components.Flowmeter : string.Empty; }
|
||||
@ -278,7 +289,7 @@ namespace Results.Entities
|
||||
DensityLine = src.DensityLine;
|
||||
DensityDiv = src.DensityDiv;
|
||||
MassOfEvapWater = src.MassOfEvapWater;
|
||||
SpareDbl = src.SpareDbl;
|
||||
Qdetected = src.Qdetected;
|
||||
Flow = src.Flow;
|
||||
VolumeCTV = src.VolumeCTV;
|
||||
VolumeMaster = src.VolumeMaster;
|
||||
@ -416,7 +427,7 @@ namespace Results.Entities
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, SpareDbl, Flow,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, Qdetected, Flow,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags,
|
||||
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
|
||||
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
|
||||
@ -485,7 +496,7 @@ namespace Results.Entities
|
||||
writer.Write(DensityLine);
|
||||
writer.Write(DensityDiv);
|
||||
writer.Write(MassOfEvapWater);
|
||||
writer.Write(SpareDbl);
|
||||
writer.Write(Qdetected);
|
||||
writer.Write(Flow);
|
||||
writer.Write(VolumeCTV);
|
||||
writer.Write(VolumeMaster);
|
||||
@ -626,7 +637,7 @@ namespace Results.Entities
|
||||
DensityLine = reader.ReadDouble();
|
||||
DensityDiv = reader.ReadDouble();
|
||||
MassOfEvapWater = reader.ReadDouble();
|
||||
SpareDbl = reader.ReadDouble();
|
||||
Qdetected = reader.ReadDouble();
|
||||
Flow = reader.ReadDouble();
|
||||
VolumeCTV = reader.ReadDouble();
|
||||
VolumeMaster = reader.ReadDouble();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
@ -15,7 +15,8 @@ namespace Results.Mappings
|
||||
Map(x => x.Qtg);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.TargetVolume);
|
||||
Map(x => x.IsFromToInPct);
|
||||
Map(x => x.TargetVolume);
|
||||
Map(x => x.TargetTime);
|
||||
Map(x => x.Repeats);
|
||||
Map(x => x.Method);
|
||||
|
||||
@ -40,7 +40,7 @@ namespace Results.Mappings
|
||||
Map(x => x.DensityLine);
|
||||
Map(x => x.DensityDiv);
|
||||
Map(x => x.MassOfEvapWater).Column("Buoyancy");
|
||||
Map(x => x.SpareDbl).Column("FlowMass");
|
||||
Map(x => x.Qdetected).Column("FlowMass");
|
||||
Map(x => x.Flow).Column("FlowVolume");
|
||||
Map(x => x.VolumeCTV);
|
||||
Map(x => x.VolumeMaster);
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2016-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace SharedDatabase.Entities
|
||||
{
|
||||
@ -18,15 +18,16 @@ namespace SharedDatabase.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual double Qtg { get; set; } /// [m3/h] flow range low limit
|
||||
public virtual double Qfrom { get; set; } /// [m3/h] flow range low limit
|
||||
public virtual double Qto { get; set; } /// [m3/h] flow range high limit
|
||||
public virtual double Qfrom { get; set; } /// [m3/h] or [%] flow range low limit
|
||||
public virtual double Qto { get; set; } /// [m3/h] or [%] flow range high limit
|
||||
public virtual bool IsFromToInPct { get; set; } /// true: Qfrom and Qto are in % of Qtg, false: Qfrom and Qto are in [m3/h]
|
||||
public virtual double TargetVolume { get; set; } /// [l] target test volume
|
||||
public virtual double TargetTime { get; set; } /// [s] target test time
|
||||
public virtual string Method { get; set; }
|
||||
public virtual double ErrLimLo { get; set; } /// [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual double ErrLimHi { get; set; } /// [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
public virtual double ErrLimMargin { get; set; } /// [%] makes error limits tighter: 0 <= ErrLimMargin <= abs(ErrLimXx)
|
||||
public virtual float TempLimLo { get; set; }
|
||||
public virtual float TempLimLo { get; set; }
|
||||
public virtual float TempLimHi { get; set; }
|
||||
public virtual string TempControl { get; set; }
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
@ -42,14 +43,15 @@ namespace SharedDatabase.Entities
|
||||
Method = string.Empty;
|
||||
}
|
||||
|
||||
public TestData(Config.Entities.Test test)
|
||||
public TestData(Test test)
|
||||
: this()
|
||||
{
|
||||
Name = test.Name;
|
||||
Repeats = test.Repeats;
|
||||
Qtg = test.Qtg;
|
||||
Qfrom = test.QfromM3ph();
|
||||
Qto = test.QtoM3ph();
|
||||
Qfrom = test.Qfrom;
|
||||
Qto = test.Qto;
|
||||
IsFromToInPct = test.IsFromToInPct;
|
||||
TargetVolume = test.Volume;
|
||||
TargetTime = test.TestTime;
|
||||
Method = test.Method;
|
||||
@ -73,6 +75,7 @@ namespace SharedDatabase.Entities
|
||||
Qtg = oriTestData.Qtg;
|
||||
Qfrom = oriTestData.Qfrom;
|
||||
Qto = oriTestData.Qto;
|
||||
IsFromToInPct = oriTestData.IsFromToInPct;
|
||||
TargetVolume = oriTestData.TargetVolume;
|
||||
TargetTime = oriTestData.TargetTime;
|
||||
Method = oriTestData.Method;
|
||||
@ -82,7 +85,7 @@ namespace SharedDatabase.Entities
|
||||
TempLimLo = oriTestData.TempLimLo;
|
||||
TempLimHi = oriTestData.TempLimHi;
|
||||
TempControl = oriTestData.TempControl;
|
||||
Publish = oriTestData.Publish;
|
||||
Publish = oriTestData.Publish;
|
||||
Evaluate = oriTestData.Evaluate;
|
||||
}
|
||||
|
||||
@ -99,6 +102,7 @@ namespace SharedDatabase.Entities
|
||||
if (Qtg != td.Qtg) return false;
|
||||
if (Qfrom != td.Qfrom) return false;
|
||||
if (Qto != td.Qto) return false;
|
||||
if (IsFromToInPct != td.IsFromToInPct) return false;
|
||||
if (TargetVolume != td.TargetVolume) return false;
|
||||
if (TargetTime != td.TargetTime) return false;
|
||||
if (Method != td.Method) return false;
|
||||
@ -141,6 +145,7 @@ namespace SharedDatabase.Entities
|
||||
writer.Write(Qtg);
|
||||
writer.Write(Qfrom);
|
||||
writer.Write(Qto);
|
||||
writer.Write(IsFromToInPct);
|
||||
writer.Write(TargetVolume);
|
||||
writer.Write(TargetTime);
|
||||
writer.Write((Method != null) ? Method : string.Empty);
|
||||
@ -162,6 +167,7 @@ namespace SharedDatabase.Entities
|
||||
Qtg = reader.ReadDouble();
|
||||
Qfrom = reader.ReadDouble();
|
||||
Qto = reader.ReadDouble();
|
||||
IsFromToInPct = reader.ReadBoolean();
|
||||
TargetVolume = reader.ReadDouble();
|
||||
TargetTime = reader.ReadDouble();
|
||||
Method = reader.ReadString();
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using Common;
|
||||
using SharedDatabase.Mappings;
|
||||
|
||||
namespace SharedDatabase.Entities
|
||||
{
|
||||
@ -44,7 +44,7 @@ namespace SharedDatabase.Entities
|
||||
public virtual double DensityLine { get; set; } /// [kg/m3]
|
||||
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
||||
public virtual double MassOfEvapWater { get; set; } /// [kg]
|
||||
public virtual double SpareDbl { get; set; }
|
||||
public virtual double Qdetected { get; set; }
|
||||
public virtual double Flow { get; set; } /// [m3/h] calculated from conventional true value
|
||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||
@ -150,9 +150,21 @@ namespace SharedDatabase.Entities
|
||||
public virtual string Name() { return Common.Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
||||
public virtual string Key() { return string.Format("{0}~{1}~{2}~{3}", TestData.Name, Part, TestData.Repeats, RepetitionNr); } /// Unique key
|
||||
public virtual int Repeats() { return TestData.Repeats; }
|
||||
public virtual double Qfrom() { return TestData.Qfrom; }
|
||||
public virtual double Qto() { return TestData.Qto; }
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double Qfrom()
|
||||
{
|
||||
return (TestData == null) ? 0
|
||||
: !TestData.IsFromToInPct ? TestData.Qfrom
|
||||
: (TestData.Qtg >= 0) ? TestData.Qfrom * TestData.Qtg / 100
|
||||
: TestData.Qfrom * Qdetected / 100;
|
||||
}
|
||||
public virtual double Qto()
|
||||
{
|
||||
return (TestData == null) ? 0
|
||||
: !TestData.IsFromToInPct ? TestData.Qto
|
||||
: (TestData.Qtg >= 0) ? TestData.Qto * TestData.Qtg / 100
|
||||
: TestData.Qto * Qdetected / 100;
|
||||
}
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double TargetTime() { return TestData.TargetTime; }
|
||||
public virtual string Method() { return TestData.Method; }
|
||||
public virtual string RefFlowmeter() { return (Components != null && Components.Flowmeter != null) ? Components.Flowmeter : string.Empty; }
|
||||
@ -278,7 +290,7 @@ namespace SharedDatabase.Entities
|
||||
DensityLine = src.DensityLine;
|
||||
DensityDiv = src.DensityDiv;
|
||||
MassOfEvapWater = src.MassOfEvapWater;
|
||||
SpareDbl = src.SpareDbl;
|
||||
Qdetected = src.Qdetected;
|
||||
Flow = src.Flow;
|
||||
VolumeCTV = src.VolumeCTV;
|
||||
VolumeMaster = src.VolumeMaster;
|
||||
@ -416,7 +428,7 @@ namespace SharedDatabase.Entities
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, SpareDbl, Flow,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, Qdetected, Flow,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags,
|
||||
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
|
||||
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
|
||||
@ -485,7 +497,7 @@ namespace SharedDatabase.Entities
|
||||
writer.Write(DensityLine);
|
||||
writer.Write(DensityDiv);
|
||||
writer.Write(MassOfEvapWater);
|
||||
writer.Write(SpareDbl);
|
||||
writer.Write(Qdetected);
|
||||
writer.Write(Flow);
|
||||
writer.Write(VolumeCTV);
|
||||
writer.Write(VolumeMaster);
|
||||
@ -626,7 +638,7 @@ namespace SharedDatabase.Entities
|
||||
DensityLine = reader.ReadDouble();
|
||||
DensityDiv = reader.ReadDouble();
|
||||
MassOfEvapWater = reader.ReadDouble();
|
||||
SpareDbl = reader.ReadDouble();
|
||||
Qdetected = reader.ReadDouble();
|
||||
Flow = reader.ReadDouble();
|
||||
VolumeCTV = reader.ReadDouble();
|
||||
VolumeMaster = reader.ReadDouble();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
@ -14,7 +14,8 @@ namespace SharedDatabase.Mappings
|
||||
Map(x => x.Qtg);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.TargetVolume);
|
||||
Map(x => x.IsFromToInPct);
|
||||
Map(x => x.TargetVolume);
|
||||
Map(x => x.TargetTime);
|
||||
Map(x => x.Repeats);
|
||||
Map(x => x.Method);
|
||||
|
||||
@ -40,7 +40,7 @@ namespace SharedDatabase.Mappings
|
||||
Map(x => x.DensityLine);
|
||||
Map(x => x.DensityDiv);
|
||||
Map(x => x.MassOfEvapWater).Column("Buoyancy");
|
||||
Map(x => x.SpareDbl).Column("FlowMass");
|
||||
Map(x => x.Qdetected).Column("FlowMass");
|
||||
Map(x => x.Flow).Column("FlowVolume");
|
||||
Map(x => x.VolumeCTV);
|
||||
Map(x => x.VolumeMaster);
|
||||
|
||||
@ -425,8 +425,8 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
|
||||
double Qave_lps = (qfromAfterDetection + qtoAfterDetection) / 7.2;
|
||||
double testTimeFromDetectedFlow = test.Volume / Qave_lps; /// Test volume wont be changed
|
||||
|
||||
Bridge.OnFlowDetected(this, new FlowDetectedEventArgs(detectedFlow, qfromAfterDetection,
|
||||
qtoAfterDetection, testTimeFromDetectedFlow, 0));
|
||||
Bridge.OnFlowDetected(this, new FlowDetectedEventArgs(detectedFlow, qfromAfterDetection, qtoAfterDetection,
|
||||
testTimeFromDetectedFlow, 0));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
||||
|
||||
if (goBackToInitFlow)
|
||||
@ -653,6 +653,7 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = TestStartTime;
|
||||
tstRslt.EndTime = TestEndTime;
|
||||
tstRslt.Qdetected = detectedFlow;
|
||||
tstRslt.FlowSetTime = flowSetTime;
|
||||
tstRslt.TestTime = cBrd.TestTime; /// [s] measurement time
|
||||
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.RefPulses); /// Pulses of the master flow meter (test total)
|
||||
@ -818,7 +819,7 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet) || ((inPath.Pump is GenericDevices.IPumpFM) && !e.Contains(Event.TurnPumpOnOffDone)));
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
}
|
||||
|
||||
if (stopCycle) retVal = Event.ErrorFlagsStop;
|
||||
|
||||
@ -551,7 +551,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
tstRslt.SpareDbl = oriTestRslt.SpareDbl;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
@ -703,7 +703,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
tstRslt.SpareDbl = oriTestRslt.SpareDbl;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
@ -855,7 +855,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = testRsltQ2ac.MassEndRaw;
|
||||
tstRslt.MassEnd = testRsltQ2ac.MassEnd;
|
||||
tstRslt.MassOfEvapWater = testRsltQ2ac.MassOfEvapWater;
|
||||
tstRslt.SpareDbl = testRsltQ2ac.SpareDbl;
|
||||
tstRslt.Qdetected = testRsltQ2ac.Qdetected;
|
||||
tstRslt.Flow = testRsltQ2ac.Flow;
|
||||
tstRslt.VolumeCTV = testRsltQ2ac.VolumeCTV;
|
||||
tstRslt.VolumeMaster = testRsltQ2ac.VolumeMaster;
|
||||
|
||||
@ -448,9 +448,13 @@ namespace TBF.UI.Settings
|
||||
string[] configDbCommands = new string[]
|
||||
{
|
||||
"ALTER TABLE `ptest` ADD `FlowId` VARCHAR(255) NOT NULL DEFAULT 'Q3' AFTER `Part`;",
|
||||
"ALTER TABLE `component` CHANGE `Parameters` `Parameters` VARCHAR(12000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;",
|
||||
};
|
||||
|
||||
string[] resultsDbCommands = new string[] { };
|
||||
string[] resultsDbCommands = new string[]
|
||||
{
|
||||
"ALTER TABLE `testdata` ADD `IsFromToInPct` BOOLEAN NOT NULL DEFAULT FALSE AFTER `Qto`;",
|
||||
};
|
||||
|
||||
if (!upgradeConfigDBCheckBox.Checked && !upgradeResultsDBCheckBox.Checked)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user