| | |
| | | |
| | | #endregion |
| | | |
| | | #region 水泵 |
| | | |
| | | if (hydroInfo.Pumps != null && hydroInfo.Pumps.Count > 0) |
| | | { |
| | | if (matchingInfo.Pumps != null && matchingInfo.Pumps.Count > 0) |
| | | { |
| | | hydroInfo.Pumps.ForEach(x => |
| | | { |
| | | var matching = matchingInfo.Pumps.Find(t => t.Code == x.Code); |
| | | if (Apply(hydroInfo, x, matching)) |
| | | { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 阀门 |
| | | |
| | | if (hydroInfo.Valves != null && hydroInfo.Valves.Count > 0) |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingModelType)) |
| | | { |
| | | visual.ModelType = matching.MatchingModelType; |
| | | visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingDbId)) |
| | | { |
| | | visual.DbId = matching.MatchingDbId; |
| | | visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (!string.IsNullOrEmpty(matching.MatchingMaterial)) |
| | | { |
| | | visual.Material = matching.MatchingMaterial; |
| | | visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (matching.MatchingDiameter.HasValue) |
| | | { |
| | | visual.Diameter = matching.MatchingDiameter.Value; |
| | | visual.UpdatePropStatus(nameof(visual.Diameter), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (matching.MatchingMinorLoss.HasValue) |
| | | { |
| | | visual.MinorLoss = matching.MatchingMinorLoss.Value; |
| | | visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | if (matching.MatchingValveType.HasValue) |
| | | { |
| | | visual.ValveType = HydroValveTypeEnumHelper.GetValveTypeCode(matching.MatchingValveType.Value); |
| | | visual.UpdatePropStatus(nameof(visual.ValveType), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | switch (visual.ValveType) |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | } |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | } |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | } |
| | |
| | | if (!string.IsNullOrEmpty(matching.MatchingValveSetting)) |
| | | { |
| | | visual.ValveSetting = matching.MatchingValveSetting; |
| | | visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复"); |
| | | result = true; |
| | | } |
| | | } |