using System.ComponentModel.DataAnnotations;
|
|
namespace IStation.Win.Schedule
|
{
|
public class PumpScheduleVm
|
{
|
|
[Display(Name = "泵站")]
|
public string Station { get; set; }
|
|
[Display(Name = "泵")]
|
public int Flag { get; set; }
|
|
|
|
[Display(Name = "调度前水位")]
|
public double? BeforeWL { get; set; }
|
|
[Display(Name = "实时水位")]
|
public double? RealTimeWL { get; set; }
|
|
|
[Display(Name = "调度前转速")]
|
public double? BeforeRpm { get; set; }
|
|
[Display(Name = "目标转速")]
|
public double? TargetRpm { get; set; }
|
|
[Display(Name = "实时转速")]
|
public double? RealTimeRpm { get; set; }
|
|
[Display(Name = "转速偏差")]
|
public double? RpmDeviation { get; set; }
|
|
[Display(Name = "目标频率")]
|
public double? TargetFrequency { get; set; }
|
|
[Display(Name = "实时频率")]
|
public double? RealTimeFrequency { get; set; }
|
|
|
[Display(Name = "调度前流量")]
|
public double? BeforeFlow { get; set; }
|
|
[Display(Name = "目标流量")]
|
public double? TargetFlow { get; set; }
|
|
[Display(Name = "实时流量")]
|
public double? RealTimeFlow { get; set; }
|
|
[Display(Name = "流量偏差")]
|
public double? FlowDeviation { get; set; }
|
|
|
[Display(Name = "调度前压力")]
|
public double? BeforePressure { get; set; }
|
|
[Display(Name = "目标压力")]
|
public double? TargetPressure { get; set; }
|
|
[Display(Name = "实时压力")]
|
public double? RealTimePressure { get; set; }
|
|
[Display(Name = "压力偏差")]
|
public double? PressureDeviation { get; set; }
|
|
|
[Display(Name = "目标扬程")]
|
public double? TargetHead { get; set; }
|
|
[Display(Name = "实际扬程")]
|
public double? RealTimeHead { get; set; }
|
|
[Display(Name = "目标压差")]
|
public double? TargetPressureDiff { get; set; }
|
|
[Display(Name = "实际压差")]
|
public double? RealTimePressureDiff { get; set; }
|
|
public void Round()
|
{
|
this.BeforeWL = Round(this.BeforeWL, 2);
|
this.RealTimeWL = Round(this.RealTimeWL, 2);
|
|
this.BeforeRpm = Round(this.BeforeRpm, 2);
|
this.TargetRpm = Round(this.TargetRpm, 2);
|
this.RealTimeRpm = Round(this.RealTimeRpm, 2);
|
this.RpmDeviation = Round(this.RpmDeviation, 2);
|
this.TargetFrequency = Round(this.TargetFrequency, 2);
|
|
this.BeforeFlow = Round(this.BeforeFlow, 1);
|
this.TargetFlow = Round(this.TargetFlow, 1);
|
this.RealTimeFlow = Round(this.RealTimeFlow, 1);
|
this.FlowDeviation = Round(this.FlowDeviation, 1);
|
|
this.BeforePressure = Round(this.BeforePressure, 2);
|
this.TargetPressure = Round(this.TargetPressure, 2);
|
this.RealTimePressure = Round(this.RealTimePressure, 2);
|
this.PressureDeviation = Round(this.PressureDeviation, 2);
|
|
this.TargetHead = Round(this.TargetHead, 2);
|
this.RealTimeHead = Round(this.RealTimeHead, 2);
|
this.TargetPressureDiff = Round(this.TargetPressureDiff, 2);
|
this.RealTimePressureDiff = Round(this.RealTimePressureDiff, 2);
|
|
|
}
|
|
private double? Round(double? value, int digits = 0)
|
{
|
if (value == null) return null;
|
return Math.Round(value.Value, digits);
|
}
|
|
public void Clear()
|
{
|
this.RealTimeRpm=null;
|
this.RpmDeviation = null;
|
|
this.RealTimeFlow = null;
|
this.FlowDeviation = null;
|
|
this.RealTimePressure = null;
|
this.PressureDeviation = null;
|
|
|
|
}
|
|
|
}
|
}
|