using System.ComponentModel.DataAnnotations;
|
|
namespace Verify
|
{
|
public class PumpScadaViewModel
|
{
|
[Display(Name = "泵")]
|
public int Flag { get; set; }
|
|
[Display(Name = "运行状态")]
|
public double? RunStatus { get; set; }
|
|
[Display(Name = "水位")]
|
public double? WL { get; set; }
|
|
//[Display(Name = "泵压力")]
|
//public double? PumpPressure { get; set; }
|
|
//[Display(Name = "出口压力")]
|
//public double? Pressure { get; set; }
|
|
[Display(Name = "泵扬程")]
|
public double? PumpHead { get; set; }
|
|
[Display(Name = "出口扬程")]
|
public double? Head { get; set; }
|
|
[Display(Name = "流量")]
|
public double? Flow { get; set; }
|
|
[Display(Name = "功率")]
|
public double? Power { get; set; }
|
|
[Display(Name = "转速")]
|
public double? Speed { get; set; }
|
|
[Display(Name = "检修状态")]
|
public double? MaintenanceState { get; set; }
|
|
|
[Display(Name = "曲线流量")]
|
public double? CurveFlow { get; set; }
|
|
[Display(Name = "流量偏差")]
|
public double? CurveFlowDiff { get; set; }
|
|
|
[Display(Name = "曲线扬程")]
|
public double? CurveHead { get; set; }
|
|
[Display(Name = "扬程偏差")]
|
public double? CurveHeadDiff { get; set; }
|
|
public void Round()
|
{
|
if (this.RunStatus != 1)
|
{
|
this.RunStatus = null;
|
this.WL = null;
|
this.PumpHead = null;
|
this.Head = null;
|
this.Flow = null;
|
this.Power = null;
|
this.Speed = null;
|
this.MaintenanceState = null;
|
}
|
else
|
{
|
this.Flow= Math.Round(this.Flow ?? 0, 2);
|
this.Head = Math.Round(this.Head ?? 0, 3);
|
if (this.Flag==15||this.Flag==16)
|
{
|
this.Speed = 590;
|
}
|
}
|
|
}
|
|
|
public void Set(IStation.Model.Pump pump)
|
{
|
if (this.Head==null)
|
{
|
return;
|
}
|
var h = this.Head - this.WL;
|
var other_head = IStation.Curve.PumpCalculateHelper.CalculateOtherPress(this.Flow, pump.Ic, pump.Oc, null, null);//测量扬程=压差 + 表位差 + 流速
|
this.PumpHead = h + other_head;
|
this.PumpHead = Math.Round(this.PumpHead ?? 0, 3);
|
}
|
}
|
|
|
|
}
|