| | |
| | | public class PumpMatchingViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public PumpMatchingViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public PumpMatchingViewModel(Yw.Model.HydroPumpInfo rhs, Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResult) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.Code = rhs.Code; |
| | | this.ModelType = rhs.ModelType; |
| | | this.DbId = rhs.DbId; |
| | | this.DbLocked = rhs.DbLocked; |
| | | this.CurveDbId = hydroInfo.Curves?.Find(x => x.Code == rhs.CurveQH)?.DbId; |
| | | this.RatedP = rhs.RatedP; |
| | | this.RatedQ = rhs.RatedQ; |
| | | this.RatedH = rhs.RatedH; |
| | | this.RatedN = rhs.RatedN; |
| | | this.RatedHz = rhs.RatedHz; |
| | | this.CurrentHz = Math.Round(rhs.RatedHz * rhs.SpeedRatio, 1); |
| | | if (allCalcuResult != null && allCalcuResult.Count > 0) |
| | | { |
| | | var calcuResult = allCalcuResult.Find(x => x.Code == rhs.Code) as HydroCalcuLinkResult; |
| | | if (calcuResult != null) |
| | | { |
| | | if (calcuResult.CalcuFlow.HasValue) |
| | | { |
| | | this.CalcuQ = Math.Abs(calcuResult.CalcuFlow.Value); |
| | | } |
| | | |
| | | var calcuResultStart = allCalcuResult.Find(x => x.Code == rhs.StartCode) as HydroCalcuNodeResult; |
| | | var calcuResultEnd = allCalcuResult.Find(x => x.Code == rhs.EndCode) as HydroCalcuNodeResult; |
| | | if (calcuResultStart != null && calcuResultEnd != null) |
| | | { |
| | | if (calcuResultStart.CalcuHead.HasValue && calcuResultEnd.CalcuHead.HasValue) |
| | | { |
| | | this.CalcuH = Math.Round(Math.Abs(calcuResultStart.CalcuHead.Value - calcuResultEnd.CalcuHead.Value), 4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | [DisplayName("ID")] |
| | | [Browsable(false)] |
| | | public long ID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 编码 |
| | | /// </summary> |
| | | [DisplayName("编码")] |
| | | [Browsable(true)] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Db锁定 |
| | | /// 编码 |
| | | /// </summary> |
| | | [DisplayName("锁定")] |
| | | [DisplayName("编码")] |
| | | [Browsable(true)] |
| | | public bool DbLocked { get; set; } |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 型号 |
| | |
| | | [DisplayName("DbId")] |
| | | [Browsable(false)] |
| | | public string DbId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Db锁定 |
| | | /// </summary> |
| | | [DisplayName("锁定")] |
| | | [Browsable(true)] |
| | | public bool DbLocked { get; set; } |
| | | |
| | | /// <summary> |
| | | /// CurveDbId |
| | |
| | | [DisplayName("额定转速")] |
| | | [Browsable(true)] |
| | | public double? RatedN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定频率 |
| | | /// </summary> |
| | | [DisplayName("额定频率")] |
| | | [Browsable(true)] |
| | | public double RatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设定频率 |
| | | /// </summary> |
| | | [DisplayName("设定频率")] |
| | | [Browsable(true)] |
| | | public double CurrentHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 计算流量 |
| | | /// </summary> |
| | | [DisplayName("计算流量")] |
| | | [Browsable(true)] |
| | | public double? CalcuQ { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 计算扬程 |
| | | /// </summary> |
| | | [DisplayName("计算扬程")] |
| | | [Browsable(true)] |
| | | public double? CalcuH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配型号 |
| | |
| | | public double? MatchingRatedN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配额定频率 |
| | | /// </summary> |
| | | [DisplayName("匹配额定频率")] |
| | | [Browsable(true)] |
| | | public double? MatchingRatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配设定频率 |
| | | /// </summary> |
| | | [DisplayName("匹配设定频率")] |
| | | [Browsable(true)] |
| | | public double? MatchingCurrentHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配流量扬程曲线 |
| | | /// </summary> |
| | | [DisplayName("匹配流量扬程曲线")] |