duheng
2024-12-19 3af811d30c93995e2500bdd2f3795be77cc1a519
WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs
@@ -2,6 +2,7 @@
using System.Windows.Media.Imaging;
using Yw.DAL.Basic;
using Yw.EPAnet;
using Yw.Hydro;
using Yw.Model;
namespace Yw.WinFrmUI
@@ -66,6 +67,12 @@
            #region 消火栓
            vm.Hydrants = hydroInfo.Hydrants?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 冷却塔
            vm.Coolings = hydroInfo.Coolings?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
@@ -346,6 +353,38 @@
                return default;
            }
            return new HydroHydrantMatchingViewModel(visualViewModel);
        }
        #endregion
        #region 冷却塔
        /// <summary>
        /// 创建冷却塔自动匹配ViewModel
        /// </summary>
        public static HydroCoolingMatchingViewModel Create(HydroCoolingInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (visualInfo == null)
            {
                return default;
            }
            if (hydroInfo == null)
            {
                return default;
            }
            return new HydroCoolingMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建冷却塔自动匹配ViewModel
        /// </summary>
        public static HydroCoolingMatchingViewModel Create(HydroCoolingViewModel visualViewModel)
        {
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroCoolingMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -793,6 +832,25 @@
            #endregion
            #region 消火栓
            if (hydroInfo.Coolings != null && hydroInfo.Coolings.Count > 0)
            {
                if (matchingInfo.Coolings != null && matchingInfo.Coolings.Count > 0)
                {
                    hydroInfo.Coolings.ForEach(x =>
                    {
                        var matching = matchingInfo.Coolings.Find(t => t.Code == x.Code);
                        if (Apply(hydroInfo, x, matching))
                        {
                            result = true;
                        }
                    });
                }
            }
            #endregion
            #region 水表
            if (hydroInfo.Meters != null && hydroInfo.Meters.Count > 0)
@@ -888,6 +946,25 @@
            #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)
@@ -953,6 +1030,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroTankViewModel visualViewModel, HydroTankMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroTankInfo visual, HydroTankMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -982,36 +1069,43 @@
            {
                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;
                }
@@ -1054,6 +1148,16 @@
        #endregion
        #region 闷头
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroBluntheadViewModel visualViewModel, HydroBluntheadMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1115,6 +1219,16 @@
        #endregion
        #region 弯头
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroElbowViewModel visualViewModel, HydroElbowMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1195,6 +1309,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroThreelinkViewModel visualViewModel, HydroThreelinkMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroThreelinkInfo visual, HydroThreelinkMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1268,6 +1392,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroFourlinkViewModel visualViewModel, HydroFourlinkMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFourlinkInfo visual, HydroFourlinkMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1325,6 +1459,16 @@
        #endregion
        #region 喷头
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroNozzleViewModel visualViewModel, HydroNozzleMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1396,6 +1540,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroHydrantViewModel visualViewModel, HydroHydrantMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroHydrantInfo visual, HydroHydrantMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1458,7 +1612,107 @@
        #endregion
        #region 冷却塔
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroCoolingViewModel visualViewModel, HydroCoolingMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroCoolingInfo visual, HydroCoolingMatchingViewModel matching)
        {
            if (hydroInfo == null)
            {
                return false;
            }
            if (visual == null)
            {
                return false;
            }
            if (matching == null)
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Material = matching.Material;
            visual.Caliber = matching.Caliber;
            visual.MinorLoss = matching.MinorLoss;
            visual.Coefficient = matching.Coefficient;
            visual.LowerLimit = matching.LowerLimit;
            bool result = false;
            if (!visual.DbLocked)
            {
                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.MatchingCaliber.HasValue)
                {
                    visual.UpdatePropStatus(nameof(visual.Caliber), ePropStatus.Matching, $"通过基础数据匹配修复,原数据:{visual.Caliber}");
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Matching, $"通过基础数据匹配修复,原数据:{visual.Material}");
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Matching, $"通过基础数据匹配修复,原数据:{visual.MinorLoss}");
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingCoefficient.HasValue)
                {
                    visual.UpdatePropStatus(nameof(visual.Coefficient), ePropStatus.Matching, $"通过基础数据匹配修复,原数据:{visual.Coefficient}");
                    visual.Coefficient = matching.MatchingCoefficient.Value;
                    result = true;
                }
                if (matching.MatchingLowerLimit.HasValue)
                {
                    visual.UpdatePropStatus(nameof(visual.LowerLimit), ePropStatus.Matching, $"通过基础数据匹配修复,原数据:{visual.LowerLimit}");
                    visual.LowerLimit = matching.MatchingLowerLimit.Value;
                    result = true;
                }
            }
            return result;
        }
        #endregion
        #region 水表
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroMeterViewModel visualViewModel, HydroMeterMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1512,6 +1766,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroFlowmeterViewModel visualViewModel, HydroFlowmeterMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFlowmeterInfo visual, HydroFlowmeterMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1561,6 +1825,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroPressmeterViewModel visualViewModel, HydroPressmeterMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPressmeterInfo visual, HydroPressmeterMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1606,6 +1880,16 @@
        #endregion
        #region 管道
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroPipeViewModel visualViewModel, HydroPipeMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1675,6 +1959,16 @@
        #endregion
        #region 过渡件
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroTranslationViewModel visualViewModel, HydroTranslationMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1760,6 +2054,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroPumpViewModel visualViewModel, HydroPumpMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo visual, HydroPumpMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -1791,41 +2095,49 @@
            {
                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;
                }
@@ -1850,6 +2162,7 @@
                            hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>();
                        }
                        hydroInfo.Curves.Add(curveqh);
                        visual.UpdatePropStatus(nameof(visual.CurveQH), ePropStatus.Matching, $"通过基础数据匹配修复");
                        visual.CurveQH = curveqh.Code;
                        result = true;
                    }
@@ -1881,6 +2194,7 @@
                            hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>();
                        }
                        hydroInfo.Curves.Add(curveqp);
                        visual.UpdatePropStatus(nameof(visual.CurveQP), ePropStatus.Matching, $"通过基础数据匹配修复");
                        visual.CurveQP = curveqp.Code;
                        result = true;
                    }
@@ -1912,6 +2226,7 @@
                            hydroInfo.Curves = new List<Yw.Model.HydroCurveInfo>();
                        }
                        hydroInfo.Curves.Add(curveqe);
                        visual.UpdatePropStatus(nameof(visual.CurveQE), ePropStatus.Matching, $"通过基础数据匹配修复");
                        visual.CurveQE = curveqe.Code;
                        result = true;
                    }
@@ -1933,6 +2248,16 @@
        #endregion
        #region 阀门
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroValveViewModel visualViewModel, HydroValveMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -1968,31 +2293,37 @@
            {
                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;
                }
@@ -2002,6 +2333,7 @@
                        {
                            if (!string.IsNullOrEmpty(matching.MatchingValveSetting))
                            {
                                visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复");
                                visual.ValveSetting = matching.MatchingValveSetting;
                                result = true;
                            }
@@ -2011,6 +2343,7 @@
                        {
                            if (!string.IsNullOrEmpty(matching.MatchingValveSetting))
                            {
                                visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复");
                                visual.ValveSetting = matching.MatchingValveSetting;
                                result = true;
                            }
@@ -2020,6 +2353,7 @@
                        {
                            if (!string.IsNullOrEmpty(matching.MatchingValveSetting))
                            {
                                visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复");
                                visual.ValveSetting = matching.MatchingValveSetting;
                                result = true;
                            }
@@ -2029,6 +2363,7 @@
                        {
                            if (!string.IsNullOrEmpty(matching.MatchingValveSetting))
                            {
                                visual.UpdatePropStatus(nameof(visual.ValveSetting), ePropStatus.Matching, "通过基础数据匹配修复");
                                visual.ValveSetting = matching.MatchingValveSetting;
                                result = true;
                            }
@@ -2121,6 +2456,16 @@
        #endregion
        #region 换热器
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroExchangerViewModel visualViewModel, HydroExchangerMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -2219,6 +2564,16 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroCompressorViewModel visualViewModel, HydroCompressorMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroCompressorInfo visual, HydroCompressorMatchingViewModel matching)
        {
            if (hydroInfo == null)
@@ -2247,26 +2602,31 @@
                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;
                }