using System;
|
using System.ComponentModel.DataAnnotations;
|
|
namespace IStation.Vm
|
{
|
public class PumpScheduleVm
|
{
|
|
public PumpScheduleVm() { }
|
public PumpScheduleVm(PumpScheduleVm rhs)
|
{
|
this.Flag = rhs.Flag;
|
this.WL = rhs.WL;
|
this.TargetRpm = rhs.TargetRpm;
|
this.CalcRpm = rhs.CalcRpm;
|
this.RpmDeviation = rhs.RpmDeviation;
|
this.TargetFlow = rhs.TargetFlow;
|
this.CalcFlow = rhs.CalcFlow;
|
this.FlowDeviation = rhs.FlowDeviation;
|
//this.TargetPressure = rhs.TargetPressure;
|
//this.CalcPressure = rhs.CalcPressure;
|
this.PressureDeviation = rhs.PressureDeviation;
|
this.TargetHead = rhs.TargetHead;
|
this.CalcHead = rhs.CalcHead;
|
this.TargetPressureDiff = rhs.TargetPressureDiff;
|
this.CalcPressureDiff = rhs.CalcPressureDiff;
|
}
|
|
|
|
[Display(Name = "泵")]
|
public int Flag { get; set; }
|
|
|
[Display(Name = "水位")]
|
public double? WL { get; set; }
|
|
|
|
[Display(Name = "目标转速")]
|
public double? TargetRpm { get; set; }
|
|
[Display(Name = "计算转速")]
|
public double? CalcRpm { get; set; }
|
|
[Display(Name = "转速偏差")]
|
public double? RpmDeviation { get; set; }
|
|
|
[Display(Name = "目标流量")]
|
public double? TargetFlow { get; set; }
|
|
[Display(Name = "计算流量")]
|
public double? CalcFlow { get; set; }
|
|
[Display(Name = "流量偏差")]
|
public double? FlowDeviation { get; set; }
|
|
|
//[Display(Name = "目标压力")]
|
//public double? TargetPressure { get; set; }
|
|
//[Display(Name = "计算压力")]
|
//public double? CalcPressure { get; set; }
|
|
[Display(Name = "压力偏差")]
|
public double? PressureDeviation { get; set; }
|
|
[Display(Name = "目标扬程")]
|
public double? TargetHead { get; set; }
|
|
[Display(Name = "计算扬程")]
|
public double? CalcHead { get; set; }
|
|
|
[Display(Name = "目标压差")]
|
public double? TargetPressureDiff { get; set; }
|
|
[Display(Name = "计算压差")]
|
public double? CalcPressureDiff { get; set; }
|
|
public void Round()
|
{
|
this.WL = Round(this.WL, 2);
|
|
this.TargetRpm = Round(this.TargetRpm, 2);
|
this.CalcRpm = Round(this.CalcRpm, 2);
|
this.RpmDeviation = Round(this.RpmDeviation, 2);
|
|
this.TargetFlow = Round(this.TargetFlow, 1);
|
this.CalcFlow = Round(this.CalcFlow, 1);
|
this.FlowDeviation = Round(this.FlowDeviation, 1);
|
|
//this.TargetPressure = Round(this.TargetPressure, 2);
|
//this.CalcPressure = Round(this.CalcPressure, 2);
|
this.PressureDeviation = Round(this.PressureDeviation, 2);
|
|
this.TargetHead = Round(this.TargetHead, 2);
|
this.CalcHead = Round(this.CalcHead, 2);
|
this.TargetPressureDiff = Round(this.TargetPressureDiff, 2);
|
this.CalcPressureDiff = Round(this.CalcPressureDiff, 2);
|
|
|
}
|
|
private double? Round(double? value, int digits = 0)
|
{
|
if (value == null) return null;
|
return Math.Round(value.Value, digits);
|
}
|
|
public void Clear()
|
{
|
this.CalcRpm=null;
|
this.RpmDeviation = null;
|
|
this.CalcFlow = null;
|
this.FlowDeviation = null;
|
|
this.PressureDeviation = null;
|
|
|
|
}
|
|
|
}
|
}
|