| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingModelType)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ModelType = matching.MatchingModelType; |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingDbId)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.DbId = matching.MatchingDbId; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMinLevel.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.MinLevel), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.MinLevel = matching.MatchingMinLevel.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMaxLevel.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.MaxLevel), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.MaxLevel = matching.MatchingMaxLevel.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingDN.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.DN), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.DN = matching.MatchingDN.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMinVol.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.MinVol), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.MinVol = matching.MatchingMinVol.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingOverFlow.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.OverFlow), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.OverFlow = matching.MatchingOverFlow.Value; |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingModelType)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.ModelType}"); |
| | | visual.ModelType = matching.MatchingModelType; |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingDbId)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.DbId}"); |
| | | visual.DbId = matching.MatchingDbId; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingRatedQ.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.RatedQ), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.RatedQ}"); |
| | | visual.RatedQ = matching.MatchingRatedQ.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingRatedH.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.RatedH), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.RatedH}"); |
| | | visual.RatedH = matching.MatchingRatedH.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingRatedP.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.RatedP), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.RatedP}"); |
| | | visual.RatedP = matching.MatchingRatedP.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingRatedN.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.RatedN), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.RatedN}"); |
| | | visual.RatedN = matching.MatchingRatedN.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingRatedHz.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.RatedHz), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.RatedHz}"); |
| | | visual.RatedHz = matching.MatchingRatedHz.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingCurrentHz.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.SpeedRatio), ePropStatus.Matching, $"通过基础数据匹配修复,原始数据:{visual.SpeedRatio}"); |
| | | visual.SpeedRatio = matching.MatchingCurrentHz.Value / visual.RatedHz; |
| | | result = true; |
| | | } |
| | |
| | | hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>(); |
| | | } |
| | | hydroInfo.Curves.Add(curveqh); |
| | | visual.UpdatePropStatus(nameof(visual.CurveQH), ePropStatus.Matching, $"通过基础数据匹配修复"); |
| | | visual.CurveQH = curveqh.Code; |
| | | result = true; |
| | | } |
| | |
| | | hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>(); |
| | | } |
| | | hydroInfo.Curves.Add(curveqp); |
| | | visual.UpdatePropStatus(nameof(visual.CurveQP), ePropStatus.Matching, $"通过基础数据匹配修复"); |
| | | visual.CurveQP = curveqp.Code; |
| | | result = true; |
| | | } |
| | |
| | | hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>(); |
| | | } |
| | | hydroInfo.Curves.Add(curveqe); |
| | | visual.UpdatePropStatus(nameof(visual.CurveQE), ePropStatus.Matching, $"通过基础数据匹配修复"); |
| | | visual.CurveQE = curveqe.Code; |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingModelType)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ModelType = matching.MatchingModelType; |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingDbId)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.DbId = matching.MatchingDbId; |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingMaterial)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.Material = matching.MatchingMaterial; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingDiameter.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.Diameter), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.Diameter = matching.MatchingDiameter.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMinorLoss.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.MinorLoss = matching.MatchingMinorLoss.Value; |
| | | result = true; |
| | | } |
| | | if (matching.MatchingValveType.HasValue) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ValveType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ValveType = HydroValveTypeEnumHelper.GetValveTypeCode(matching.MatchingValveType.Value); |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | result = true; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | result = true; |
| | | } |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingModelType)) |
| | | { |
| | | visual.ModelType = matching.MatchingModelType; |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Normal, "匹配修复"); |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingDbId)) |
| | | { |
| | | visual.DbId = matching.MatchingDbId; |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Normal, "匹配修复"); |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingMaterial)) |
| | | { |
| | | visual.Material = matching.MatchingMaterial; |
| | | visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Normal, "匹配修复"); |
| | | visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (matching.MatchingDiameter.HasValue) |
| | | { |
| | | visual.Diameter = matching.MatchingDiameter.Value; |
| | | visual.UpdatePropStatus(nameof(visual.Diameter), ePropStatus.Normal, "匹配修复"); |
| | | visual.UpdatePropStatus(nameof(visual.Diameter), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMinorLoss.HasValue) |
| | | { |
| | | visual.MinorLoss = matching.MatchingMinorLoss.Value; |
| | | visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Normal, "匹配修复"); |
| | | visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | |