Update modello x fornire cicli pre-riscaldo
This commit is contained in:
@@ -7,91 +7,95 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThProd
|
||||
{
|
||||
public class DTOProdInfo
|
||||
public class DTOProdInfo
|
||||
{
|
||||
public DateTime DtEvent { get; set; }
|
||||
public short NumTarget { get; set; } = 0;
|
||||
public short NumDone { get; set; } = 0;
|
||||
public double TimeWarm { get; set; } = 0;
|
||||
public double TimeVent { get; set; } = 0;
|
||||
public double TimeVacuum { get; set; } = 0;
|
||||
public double TimeCycleGross { get; set; } = 0;
|
||||
public double TimeCycleNet { get; set; } = 0;
|
||||
public int NumDec { get; set; } = 1;
|
||||
public int ScaleFactor { get; set; } = 1000;
|
||||
public double MaterialTempEndWarm { get; set; } = 0;
|
||||
public double MaterialTempEndVent { get; set; } = 0;
|
||||
public double MoldTemp { get; set; } = 0;
|
||||
public double VacuumReadVal { get; set; } = 0;
|
||||
public double MouldEnergyOUT { get; set; } = 0;
|
||||
public double MouldEnergyIN { get; set; } = 0;
|
||||
public bool IsScrap { get; set; } = false;
|
||||
public short NumPreHot { get; set; } = 0;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
public DateTime DtEvent { get; set; }
|
||||
public short NumTarget { get; set; } = 0;
|
||||
public short NumDone { get; set; } = 0;
|
||||
public double TimeWarm { get; set; } = 0;
|
||||
public double TimeVent { get; set; } = 0;
|
||||
public double TimeVacuum { get; set; } = 0;
|
||||
public double TimeCycleGross { get; set; } = 0;
|
||||
public double TimeCycleNet { get; set; } = 0;
|
||||
public int NumDec { get; set; } = 1;
|
||||
public int ScaleFactor { get; set; } = 1000;
|
||||
public double MaterialTempEndWarm { get; set; } = 0;
|
||||
public double MaterialTempEndVent { get; set; } = 0;
|
||||
public double MoldTemp { get; set; } = 0;
|
||||
public double VacuumReadVal { get; set; } = 0;
|
||||
public double MouldEnergyOUT { get; set; } = 0;
|
||||
public double MouldEnergyIN { get; set; } = 0;
|
||||
public bool IsScrap { get; set; } = false;
|
||||
// Object is not a GaugeModel instance
|
||||
if (!(obj is DTOProdInfo item))
|
||||
return false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// Object is not a GaugeModel instance
|
||||
if (!(obj is DTOProdInfo item))
|
||||
return false;
|
||||
if (DtEvent != item.DtEvent)
|
||||
return false;
|
||||
if (NumTarget != item.NumTarget)
|
||||
return false;
|
||||
if (NumDone != item.NumDone)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeWarm - item.TimeWarm), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeVent - item.TimeVent), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeVacuum - item.TimeVacuum), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeCycleGross - item.TimeCycleGross), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeCycleNet - item.TimeCycleNet), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MaterialTempEndWarm - item.MaterialTempEndWarm), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MaterialTempEndVent - item.MaterialTempEndVent), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MoldTemp - item.MoldTemp), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(VacuumReadVal - item.VacuumReadVal), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MouldEnergyOUT - item.MouldEnergyOUT), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MouldEnergyIN - item.MouldEnergyIN), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (IsScrap != item.IsScrap)
|
||||
return false;
|
||||
if (NumPreHot != item.NumPreHot)
|
||||
return false;
|
||||
|
||||
if (DtEvent != item.DtEvent)
|
||||
return false;
|
||||
if (NumTarget != item.NumTarget)
|
||||
return false;
|
||||
if (NumDone != item.NumDone)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeWarm - item.TimeWarm), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeVent - item.TimeVent), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeVacuum - item.TimeVacuum), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeCycleGross - item.TimeCycleGross), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(TimeCycleNet - item.TimeCycleNet), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MaterialTempEndWarm - item.MaterialTempEndWarm), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MaterialTempEndVent - item.MaterialTempEndVent), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MoldTemp - item.MoldTemp), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(VacuumReadVal - item.VacuumReadVal), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MouldEnergyOUT - item.MouldEnergyOUT), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (Math.Round(Math.Abs(MouldEnergyIN - item.MouldEnergyIN), 1) >= Constants.EPSILON)
|
||||
return false;
|
||||
if (IsScrap != item.IsScrap)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
public DTOProdInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public DTOProdInfo(ThermoModels.ProdInfoModel pimRawData)
|
||||
{
|
||||
this.DtEvent = pimRawData.DtEvent;
|
||||
this.NumDone = pimRawData.NumDone;
|
||||
this.NumTarget = pimRawData.NumTarget;
|
||||
this.TimeCycleGross = Math.Round((double)pimRawData.TimeCycleGross / this.ScaleFactor, 2);
|
||||
this.TimeCycleNet = Math.Round((double)pimRawData.TimeCycleNet / this.ScaleFactor, 2);
|
||||
this.TimeVacuum = Math.Round((double)pimRawData.TimeVacuum / this.ScaleFactor, 2);
|
||||
this.TimeVent = Math.Round((double)pimRawData.TimeVent / this.ScaleFactor, 2);
|
||||
this.TimeWarm = Math.Round((double)pimRawData.TimeWarm / this.ScaleFactor, 2);
|
||||
this.MaterialTempEndWarm = pimRawData.MaterialTempEndWarm;
|
||||
this.MaterialTempEndVent = pimRawData.MaterialTempEndVent;
|
||||
this.MoldTemp = pimRawData.MoldTemp;
|
||||
this.VacuumReadVal = pimRawData.VacuumReadVal;
|
||||
this.MouldEnergyIN = pimRawData.MouldEnergyIN;
|
||||
this.MouldEnergyOUT = pimRawData.MouldEnergyOUT;
|
||||
this.IsScrap = pimRawData.IsScrap;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
public DTOProdInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public DTOProdInfo(ThermoModels.ProdInfoModel pimRawData)
|
||||
{
|
||||
this.DtEvent = pimRawData.DtEvent;
|
||||
this.NumDone = pimRawData.NumDone;
|
||||
this.NumTarget = pimRawData.NumTarget;
|
||||
this.TimeCycleGross = Math.Round((double)pimRawData.TimeCycleGross / this.ScaleFactor, 2);
|
||||
this.TimeCycleNet = Math.Round((double)pimRawData.TimeCycleNet / this.ScaleFactor, 2);
|
||||
this.TimeVacuum = Math.Round((double)pimRawData.TimeVacuum / this.ScaleFactor, 2);
|
||||
this.TimeVent = Math.Round((double)pimRawData.TimeVent / this.ScaleFactor, 2);
|
||||
this.TimeWarm = Math.Round((double)pimRawData.TimeWarm / this.ScaleFactor, 2);
|
||||
this.MaterialTempEndWarm = pimRawData.MaterialTempEndWarm;
|
||||
this.MaterialTempEndVent = pimRawData.MaterialTempEndVent;
|
||||
this.MoldTemp = pimRawData.MoldTemp;
|
||||
this.VacuumReadVal = pimRawData.VacuumReadVal;
|
||||
this.MouldEnergyIN = pimRawData.MouldEnergyIN;
|
||||
this.MouldEnergyOUT = pimRawData.MouldEnergyOUT;
|
||||
this.IsScrap = pimRawData.IsScrap;
|
||||
this.NumPreHot = pimRawData.NumPreHot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user