Shuxia Ning
2025-01-15 9eb94e9eec2e2e164698e34d0481d66093c8655b
WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs
@@ -1,7 +1,4 @@
using DevExpress.XtraSpreadsheet.Model.CopyOperation;
using System.Windows.Media.Imaging;
using Yw.DAL.Basic;
using Yw.EPAnet;
using Yw.Hydro;
using Yw.Model;
namespace Yw.WinFrmUI
@@ -15,22 +12,9 @@
        #region 创建
        /// <summary>
        /// 创建自动匹配ViewModel
        /// </summary>
        public static HydroMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResultVisualList = null)
        {
            if (hydroInfo == null)
            {
                return default;
            }
            var allCalcuResultVisualDict = allCalcuResultVisualList?.ToDictionary(x => x.Code);
            return Create(hydroInfo, allCalcuResultVisualDict);
        }
        /// <summary>
        /// 创建
        /// </summary>
        public static HydroMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuResultVisualDict = null)
        public static HydroMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo)
        {
            if (hydroInfo == null)
            {
@@ -42,97 +26,103 @@
            #region 水池
            var tanks = hydroInfo.GetAllTanks();
            vm.Tanks = tanks?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Tanks = tanks?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 闷头
            vm.Bluntheads = hydroInfo.Bluntheads?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Bluntheads = hydroInfo.Bluntheads?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 弯头
            vm.Elbows = hydroInfo.Elbows?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Elbows = hydroInfo.Elbows?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 三通
            vm.Threelinks = hydroInfo.Threelinks?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Threelinks = hydroInfo.Threelinks?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 四通
            vm.Fourlinks = hydroInfo.Fourlinks?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Fourlinks = hydroInfo.Fourlinks?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 喷嘴
            vm.Nozzles = hydroInfo.Nozzles?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Nozzles = hydroInfo.Nozzles?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 消火栓
            vm.Hydrants = hydroInfo.Hydrants?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Hydrants = hydroInfo.Hydrants?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 冷却塔
            vm.Coolings = hydroInfo.Coolings?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 水表
            vm.Meters = hydroInfo.Meters?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuNodeResult)).ToList();
            vm.Meters = hydroInfo.Meters?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 流量计
            vm.Flowmeters = hydroInfo.Flowmeters?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuFlowmeterResult)).ToList();
            vm.Flowmeters = hydroInfo.Flowmeters?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 压力表
            vm.Pressmeters = hydroInfo.Pressmeters?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuPressmeterResult)).ToList();
            vm.Pressmeters = hydroInfo.Pressmeters?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 管道
            vm.Pipes = hydroInfo.Pipes?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuLinkResult)).ToList();
            vm.Pipes = hydroInfo.Pipes?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 过渡件
            vm.Translations = hydroInfo.Translations?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuLinkResult)).ToList();
            vm.Translations = hydroInfo.Translations?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 水泵
            vm.Pumps = hydroInfo.Pumps?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuPumpResult)).ToList();
            vm.Pumps = hydroInfo.Pumps?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 阀门
            vm.Valves = hydroInfo.Valves?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuLinkResult)).ToList();
            vm.Valves = hydroInfo.Valves?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 换热器
            vm.Exchangers = hydroInfo.Exchangers?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuLinkResult)).ToList();
            vm.Exchangers = hydroInfo.Exchangers?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
            #region 压缩机
            vm.Compressors = hydroInfo.Compressors?.Select(x => Create(x, hydroInfo, allCalcuResultVisualDict?.GetValue(x.Code) as HydroCalcuLinkResult)).ToList();
            vm.Compressors = hydroInfo.Compressors?.Select(x => Create(x, hydroInfo)).ToList();
            #endregion
@@ -144,9 +134,9 @@
        /// <summary>
        /// 创建水池自动匹配ViewModel
        /// </summary>
        public static HydroTankMatchingViewModel Create(HydroTankInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroTankMatchingViewModel Create(HydroTankInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -154,19 +144,19 @@
            {
                return default;
            }
            return new HydroTankMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroTankMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建水池自动匹配ViewModel
        /// </summary>
        public static HydroTankMatchingViewModel Create(HydroTankViewModel parterViewModel)
        public static HydroTankMatchingViewModel Create(HydroTankViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroTankMatchingViewModel(parterViewModel);
            return new HydroTankMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -176,9 +166,9 @@
        /// <summary>
        /// 创建闷头自动匹配ViewModel
        /// </summary>
        public static HydroBluntheadMatchingViewModel Create(HydroBluntheadInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroBluntheadMatchingViewModel Create(HydroBluntheadInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -186,19 +176,19 @@
            {
                return default;
            }
            return new HydroBluntheadMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroBluntheadMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建闷头自动匹配ViewModel
        /// </summary>
        public static HydroBluntheadMatchingViewModel Create(HydroBluntheadViewModel parterViewModel)
        public static HydroBluntheadMatchingViewModel Create(HydroBluntheadViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroBluntheadMatchingViewModel(parterViewModel);
            return new HydroBluntheadMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -208,9 +198,9 @@
        /// <summary>
        /// 创建弯头自动匹配ViewModel
        /// </summary>
        public static HydroElbowMatchingViewModel Create(HydroElbowInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroElbowMatchingViewModel Create(HydroElbowInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -218,19 +208,19 @@
            {
                return default;
            }
            return new HydroElbowMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroElbowMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建弯头自动匹配ViewModel
        /// </summary>
        public static HydroElbowMatchingViewModel Create(HydroElbowViewModel parterViewModel)
        public static HydroElbowMatchingViewModel Create(HydroElbowViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroElbowMatchingViewModel(parterViewModel);
            return new HydroElbowMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -240,9 +230,9 @@
        /// <summary>
        /// 创建三通自动匹配ViewModel
        /// </summary>
        public static HydroThreelinkMatchingViewModel Create(HydroThreelinkInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroThreelinkMatchingViewModel Create(HydroThreelinkInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -250,19 +240,19 @@
            {
                return default;
            }
            return new HydroThreelinkMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroThreelinkMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建三通自动匹配ViewModel
        /// </summary>
        public static HydroThreelinkMatchingViewModel Create(HydroThreelinkViewModel parterViewModel)
        public static HydroThreelinkMatchingViewModel Create(HydroThreelinkViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroThreelinkMatchingViewModel(parterViewModel);
            return new HydroThreelinkMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -272,9 +262,9 @@
        /// <summary>
        /// 创建四通自动匹配ViewModel
        /// </summary>
        public static HydroFourlinkMatchingViewModel Create(HydroFourlinkInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroFourlinkMatchingViewModel Create(HydroFourlinkInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -282,19 +272,19 @@
            {
                return default;
            }
            return new HydroFourlinkMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroFourlinkMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建四通自动匹配ViewModel
        /// </summary>
        public static HydroFourlinkMatchingViewModel Create(HydroFourlinkViewModel parterViewModel)
        public static HydroFourlinkMatchingViewModel Create(HydroFourlinkViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroFourlinkMatchingViewModel(parterViewModel);
            return new HydroFourlinkMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -304,9 +294,9 @@
        /// <summary>
        /// 创建喷头自动匹配ViewModel
        /// </summary>
        public static HydroNozzleMatchingViewModel Create(HydroNozzleInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroNozzleMatchingViewModel Create(HydroNozzleInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -314,19 +304,19 @@
            {
                return default;
            }
            return new HydroNozzleMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroNozzleMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建喷头自动匹配ViewModel
        /// </summary>
        public static HydroNozzleMatchingViewModel Create(HydroNozzleViewModel parterViewModel)
        public static HydroNozzleMatchingViewModel Create(HydroNozzleViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroNozzleMatchingViewModel(parterViewModel);
            return new HydroNozzleMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -336,9 +326,9 @@
        /// <summary>
        /// 创建消火栓自动匹配ViewModel
        /// </summary>
        public static HydroHydrantMatchingViewModel Create(HydroHydrantInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroHydrantMatchingViewModel Create(HydroHydrantInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -346,19 +336,51 @@
            {
                return default;
            }
            return new HydroHydrantMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroHydrantMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建消火栓自动匹配ViewModel
        /// </summary>
        public static HydroHydrantMatchingViewModel Create(HydroHydrantViewModel parterViewModel)
        public static HydroHydrantMatchingViewModel Create(HydroHydrantViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroHydrantMatchingViewModel(parterViewModel);
            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
@@ -368,9 +390,9 @@
        /// <summary>
        /// 创建水表自动匹配ViewModel
        /// </summary>
        public static HydroMeterMatchingViewModel Create(HydroMeterInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuNodeResult calcuResult = null)
        public static HydroMeterMatchingViewModel Create(HydroMeterInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -378,19 +400,19 @@
            {
                return default;
            }
            return new HydroMeterMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroMeterMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建水表自动匹配ViewModel
        /// </summary>
        public static HydroMeterMatchingViewModel Create(HydroMeterViewModel parterViewModel)
        public static HydroMeterMatchingViewModel Create(HydroMeterViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroMeterMatchingViewModel(parterViewModel);
            return new HydroMeterMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -400,9 +422,9 @@
        /// <summary>
        /// 创建流量计自动匹配ViewModel
        /// </summary>
        public static HydroFlowmeterMatchingViewModel Create(HydroFlowmeterInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuFlowmeterResult calcuResult = null)
        public static HydroFlowmeterMatchingViewModel Create(HydroFlowmeterInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -410,19 +432,19 @@
            {
                return default;
            }
            return new HydroFlowmeterMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroFlowmeterMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建流量计自动匹配ViewModel
        /// </summary>
        public static HydroFlowmeterMatchingViewModel Create(HydroFlowmeterViewModel parterViewModel)
        public static HydroFlowmeterMatchingViewModel Create(HydroFlowmeterViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroFlowmeterMatchingViewModel(parterViewModel);
            return new HydroFlowmeterMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -432,9 +454,9 @@
        /// <summary>
        /// 创建压力表自动匹配ViewModel
        /// </summary>
        public static HydroPressmeterMatchingViewModel Create(HydroPressmeterInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuPressmeterResult calcuResult = null)
        public static HydroPressmeterMatchingViewModel Create(HydroPressmeterInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -442,19 +464,19 @@
            {
                return default;
            }
            return new HydroPressmeterMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroPressmeterMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建压力表自动匹配ViewModel
        /// </summary>
        public static HydroPressmeterMatchingViewModel Create(HydroPressmeterViewModel parterViewModel)
        public static HydroPressmeterMatchingViewModel Create(HydroPressmeterViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroPressmeterMatchingViewModel(parterViewModel);
            return new HydroPressmeterMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -464,9 +486,9 @@
        /// <summary>
        /// 创建管道自动匹配ViewModel
        /// </summary>
        public static HydroPipeMatchingViewModel Create(HydroPipeInfo pipeInfo, HydroModelInfo hydroInfo, HydroCalcuLinkResult calcuResult = null)
        public static HydroPipeMatchingViewModel Create(HydroPipeInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (pipeInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -474,19 +496,19 @@
            {
                return default;
            }
            return new HydroPipeMatchingViewModel(pipeInfo, hydroInfo, calcuResult);
            return new HydroPipeMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建管道自动匹配ViewModel
        /// </summary>
        public static HydroPipeMatchingViewModel Create(HydroPipeViewModel pipeViewModel)
        public static HydroPipeMatchingViewModel Create(HydroPipeViewModel visualViewModel)
        {
            if (pipeViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroPipeMatchingViewModel(pipeViewModel);
            return new HydroPipeMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -496,9 +518,9 @@
        /// <summary>
        /// 创建过渡件自动匹配ViewModel
        /// </summary>
        public static HydroTranslationMatchingViewModel Create(HydroTranslationInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuLinkResult calcuResult = null)
        public static HydroTranslationMatchingViewModel Create(HydroTranslationInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -506,19 +528,19 @@
            {
                return default;
            }
            return new HydroTranslationMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroTranslationMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建过渡件自动匹配ViewModel
        /// </summary>
        public static HydroTranslationMatchingViewModel Create(HydroTranslationViewModel parterViewModel)
        public static HydroTranslationMatchingViewModel Create(HydroTranslationViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroTranslationMatchingViewModel(parterViewModel);
            return new HydroTranslationMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -528,9 +550,9 @@
        /// <summary>
        /// 创建水泵自动匹配ViewModel
        /// </summary>
        public static HydroPumpMatchingViewModel Create(HydroPumpInfo pumpInfo, HydroModelInfo hydroInfo, HydroCalcuPumpResult calcuResult = null)
        public static HydroPumpMatchingViewModel Create(HydroPumpInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (pumpInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -538,19 +560,19 @@
            {
                return default;
            }
            return new HydroPumpMatchingViewModel(pumpInfo, hydroInfo, calcuResult);
            return new HydroPumpMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建水泵自动匹配ViewModel
        /// </summary>
        public static HydroPumpMatchingViewModel Create(HydroPumpViewModel pumpViewModel)
        public static HydroPumpMatchingViewModel Create(HydroPumpViewModel visualViewModel)
        {
            if (pumpViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroPumpMatchingViewModel(pumpViewModel);
            return new HydroPumpMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -560,9 +582,9 @@
        /// <summary>
        /// 创建阀门自动匹配ViewModel
        /// </summary>
        public static HydroValveMatchingViewModel Create(HydroValveInfo valveInfo, HydroModelInfo hydroInfo, HydroCalcuLinkResult calcuResult = null)
        public static HydroValveMatchingViewModel Create(HydroValveInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (valveInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -570,19 +592,19 @@
            {
                return default;
            }
            return new HydroValveMatchingViewModel(valveInfo, hydroInfo, calcuResult);
            return new HydroValveMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建阀门自动匹配ViewModel
        /// </summary>
        public static HydroValveMatchingViewModel Create(HydroValveViewModel valveViewModel)
        public static HydroValveMatchingViewModel Create(HydroValveViewModel visualViewModel)
        {
            if (valveViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroValveMatchingViewModel(valveViewModel);
            return new HydroValveMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -592,9 +614,9 @@
        /// <summary>
        /// 创建换热器自动匹配ViewModel
        /// </summary>
        public static HydroExchangerMatchingViewModel Create(HydroExchangerInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuLinkResult calcuResult = null)
        public static HydroExchangerMatchingViewModel Create(HydroExchangerInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -602,19 +624,19 @@
            {
                return default;
            }
            return new HydroExchangerMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroExchangerMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建换热器自动匹配ViewModel
        /// </summary>
        public static HydroExchangerMatchingViewModel Create(HydroExchangerViewModel parterViewModel)
        public static HydroExchangerMatchingViewModel Create(HydroExchangerViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroExchangerMatchingViewModel(parterViewModel);
            return new HydroExchangerMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -624,9 +646,9 @@
        /// <summary>
        /// 创建压缩机自动匹配ViewModel
        /// </summary>
        public static HydroCompressorMatchingViewModel Create(HydroCompressorInfo parterInfo, HydroModelInfo hydroInfo, HydroCalcuLinkResult calcuResult = null)
        public static HydroCompressorMatchingViewModel Create(HydroCompressorInfo visualInfo, HydroModelInfo hydroInfo)
        {
            if (parterInfo == null)
            if (visualInfo == null)
            {
                return default;
            }
@@ -634,19 +656,19 @@
            {
                return default;
            }
            return new HydroCompressorMatchingViewModel(parterInfo, hydroInfo, calcuResult);
            return new HydroCompressorMatchingViewModel(visualInfo, hydroInfo);
        }
        /// <summary>
        /// 创建压缩机自动匹配ViewModel
        /// </summary>
        public static HydroCompressorMatchingViewModel Create(HydroCompressorViewModel parterViewModel)
        public static HydroCompressorMatchingViewModel Create(HydroCompressorViewModel visualViewModel)
        {
            if (parterViewModel == null)
            if (visualViewModel == null)
            {
                return default;
            }
            return new HydroCompressorMatchingViewModel(parterViewModel);
            return new HydroCompressorMatchingViewModel(visualViewModel);
        }
        #endregion
@@ -806,6 +828,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)
@@ -901,6 +942,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)
@@ -966,7 +1026,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroTankInfo visual, HydroTankMatchingViewModel matching)
        public static bool Apply
            (
                HydroTankViewModel visualViewModel,
                HydroTankMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroTankInfo visual,
                HydroTankMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -980,51 +1063,86 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.MinLevel = matching.MinLevel;
            visual.MaxLevel = matching.MaxLevel;
            visual.DN = matching.DN;
            visual.MinVol = matching.MinVol;
            visual.OverFlow = matching.OverFlow;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.MinLevel = matching.MinLevel;
            //visual.MaxLevel = matching.MaxLevel;
            //visual.DN = matching.DN;
            //visual.MinVol = matching.MinVol;
            //visual.OverFlow = matching.OverFlow;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingMinLevel.HasValue)
                {
                    if (visual.MinLevel != matching.MatchingMinLevel.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinLevel), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinLevel = matching.MatchingMinLevel.Value;
                    result = true;
                }
                if (matching.MatchingMaxLevel.HasValue)
                {
                    if (visual.MaxLevel != matching.MatchingMaxLevel.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MaxLevel), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MaxLevel = matching.MatchingMaxLevel.Value;
                    result = true;
                }
                if (matching.MatchingDN.HasValue)
                {
                    if (visual.DN != matching.MatchingDN.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DN), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DN = matching.MatchingDN.Value;
                    result = true;
                }
                if (matching.MatchingMinVol.HasValue)
                {
                    if (visual.MinVol != matching.MatchingMinVol.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinVol), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinVol = matching.MatchingMinVol.Value;
                    result = true;
                }
                if (matching.MatchingOverFlow.HasValue)
                {
                    if (visual.OverFlow != matching.MatchingOverFlow.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.OverFlow), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.OverFlow = matching.MatchingOverFlow.Value;
                    result = true;
                }
@@ -1040,7 +1158,7 @@
                        curvevol.ModelType = string.Empty;
                        curvevol.DbLocked = false;
                        curvevol.DbId = matching.MatchingCurveDbId;
                        curvevol.CurveType = Yw.WinFrmUI.HydroCurve.TankVol;
                        curvevol.CurveType = Yw.WinFrmUI.HydroCurveType.CurveVol;
                        curvevol.CurveData = matching.MatchingVolCurve?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {
@@ -1048,6 +1166,7 @@
                        }
                        hydroInfo.Curves.Add(curvevol);
                        visual.VolCurve = curvevol.Code;
                        changeHelper?.Append(curvevol, eChangeType.Add);
                        result = true;
                    }
                    else
@@ -1056,7 +1175,22 @@
                        {
                            curvevol.DbId = matching.MatchingCurveDbId;
                            curvevol.CurveData = matching.MatchingVolCurve?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                            changeHelper?.Append(curvevol, eChangeType.Update);
                            result = true;
                        }
                    }
                    propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.VolCurve), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修复");
                }
                else
                {
                    if (!string.IsNullOrEmpty(visual.VolCurve))
                    {
                        var volCurve = hydroInfo?.Curves?.Find(x => x.Code == visual.VolCurve);
                        if (volCurve != null)
                        {
                            hydroInfo.Curves?.RemoveAll(x => x.Code == visual.VolCurve);
                            visual.VolCurve = string.Empty;
                            changeHelper?.Append(volCurve, eChangeType.Remove);
                        }
                    }
                }
@@ -1071,7 +1205,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroBluntheadInfo visual, HydroBluntheadMatchingViewModel matching)
        public static bool Apply
            (
                HydroBluntheadViewModel visualViewModel,
                HydroBluntheadMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroBluntheadInfo visual,
                HydroBluntheadMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1085,39 +1242,64 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Caliber = matching.Caliber;
            visual.Material = matching.Material;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Caliber = matching.Caliber;
            //visual.Material = matching.Material;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1132,7 +1314,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroElbowInfo visual, HydroElbowMatchingViewModel matching)
        public static bool Apply
            (
                HydroElbowViewModel visualViewModel,
                HydroElbowMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroElbowInfo visual,
                HydroElbowMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1146,55 +1351,91 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Caliber = matching.Caliber;
            visual.Material = matching.Material;
            visual.MinorLoss = matching.MinorLoss;
            visual.BendingAngle = matching.BendingAngle;
            if (matching.ElbowType.HasValue)
            {
                visual.ElbowType = HydroElbowTypeEnumHelper.GetElbowTypeName(matching.ElbowType.Value);
            }
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Caliber = matching.Caliber;
            //visual.Material = matching.Material;
            //visual.MinorLoss = matching.MinorLoss;
            //visual.BendingAngle = matching.BendingAngle;
            //if (matching.ElbowType.HasValue)
            //{
            //    visual.ElbowType = HydroElbowTypeEnumHelper.GetElbowTypeName(matching.ElbowType.Value);
            //}
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingBendingAngle.HasValue)
                {
                    if (visual.BendingAngle != matching.MatchingBendingAngle.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.BendingAngle), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.BendingAngle = matching.MatchingBendingAngle.Value;
                    result = true;
                }
                if (matching.MatchingElbowType.HasValue)
                {
                    visual.ElbowType = HydroElbowTypeEnumHelper.GetElbowTypeName(matching.MatchingElbowType.Value);
                    var elbowType = HydroElbowTypeEnumHelper.GetElbowTypeName(matching.MatchingElbowType.Value);
                    if (visual.ElbowType != elbowType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ElbowType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ElbowType = elbowType;
                    result = true;
                }
            }
@@ -1208,7 +1449,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroThreelinkInfo visual, HydroThreelinkMatchingViewModel matching)
        public static bool Apply
            (
                HydroThreelinkViewModel visualViewModel,
                HydroThreelinkMatchingViewModel matching,
                HydroChangeHelper changeHelper,
                HydroPropStatusHelper propStatusHelper
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroThreelinkInfo visual,
                HydroThreelinkMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1222,51 +1486,86 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Caliber = matching.Caliber;
            visual.Material = matching.Material;
            visual.MinorLoss = matching.MinorLoss;
            visual.RunningThroughLoss = matching.RunningThroughLoss;
            visual.BranchThroughLoss = matching.BranchThroughLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Caliber = matching.Caliber;
            //visual.Material = matching.Material;
            //visual.MinorLoss = matching.MinorLoss;
            //visual.RunningThroughLoss = matching.RunningThroughLoss;
            //visual.BranchThroughLoss = matching.BranchThroughLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingRunningThroughLoss.HasValue)
                {
                    if (visual.RunningThroughLoss != matching.MatchingRunningThroughLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RunningThroughLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RunningThroughLoss = matching.MatchingRunningThroughLoss.Value;
                    result = true;
                }
                if (matching.MatchingBranchThroughLoss.HasValue)
                {
                    if (visual.BranchThroughLoss != matching.MatchingBranchThroughLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.BranchThroughLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.BranchThroughLoss = matching.MatchingBranchThroughLoss.Value;
                    result = true;
                }
@@ -1281,7 +1580,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFourlinkInfo visual, HydroFourlinkMatchingViewModel matching)
        public static bool Apply
            (
                HydroFourlinkViewModel visualViewModel,
                HydroFourlinkMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroFourlinkInfo visual,
                HydroFourlinkMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1295,39 +1617,64 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Caliber = matching.Caliber;
            visual.Material = matching.Material;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Caliber = matching.Caliber;
            //visual.Material = matching.Material;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1342,7 +1689,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroNozzleInfo visual, HydroNozzleMatchingViewModel matching)
        public static bool Apply
            (
                HydroNozzleViewModel visualViewModel,
                HydroNozzleMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroNozzleInfo visual,
                HydroNozzleMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1356,45 +1726,75 @@
            {
                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.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;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingCoefficient.HasValue)
                {
                    if (visual.Coefficient != matching.MatchingCoefficient.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Coefficient), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Coefficient = matching.MatchingCoefficient.Value;
                    result = true;
                }
@@ -1409,7 +1809,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroHydrantInfo visual, HydroHydrantMatchingViewModel matching)
        public static bool Apply
            (
                HydroHydrantViewModel visualViewModel,
                HydroHydrantMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroHydrantInfo visual,
                HydroHydrantMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1423,46 +1846,207 @@
            {
                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.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;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingCoefficient.HasValue)
                {
                    if (visual.Coefficient != matching.MatchingCoefficient.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Coefficient), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Coefficient = matching.MatchingCoefficient.Value;
                    result = true;
                }
            }
            return result;
        }
        #endregion
        #region 冷却塔
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                HydroCoolingViewModel visualViewModel,
                HydroCoolingMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroCoolingInfo visual,
                HydroCoolingMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            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))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingCaliber.HasValue)
                {
                    if (visual.Caliber != matching.MatchingCaliber.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Caliber), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Caliber = matching.MatchingCaliber.Value;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingCoefficient.HasValue)
                {
                    if (visual.Coefficient != matching.MatchingCoefficient.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Coefficient), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Coefficient = matching.MatchingCoefficient.Value;
                    result = true;
                }
                if (matching.MatchingLowerLimit.HasValue)
                {
                    if (visual.LowerLimit != matching.MatchingLowerLimit.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.LowerLimit), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.LowerLimit = matching.MatchingLowerLimit.Value;
                    result = true;
                }
            }
@@ -1476,7 +2060,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroMeterInfo visual, HydroMeterMatchingViewModel matching)
        public static bool Apply
            (
                HydroMeterViewModel visualViewModel,
                HydroMeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroMeterInfo visual,
                HydroMeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1490,27 +2097,42 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1525,7 +2147,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFlowmeterInfo visual, HydroFlowmeterMatchingViewModel matching)
        public static bool Apply
            (
                HydroFlowmeterViewModel visualViewModel,
                HydroFlowmeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroFlowmeterInfo visual,
                HydroFlowmeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1539,27 +2184,42 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            // visual.ModelType = matching.ModelType;
            // visual.MinorLoss = matching.MinorLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1574,7 +2234,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPressmeterInfo visual, HydroPressmeterMatchingViewModel matching)
        public static bool Apply
            (
                HydroPressmeterViewModel visualViewModel,
                HydroPressmeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPressmeterInfo visual,
                HydroPressmeterMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1588,27 +2271,42 @@
            {
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1623,7 +2321,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPipeInfo visual, HydroPipeMatchingViewModel matching)
        public static bool Apply
            (
                HydroPipeViewModel visualViewModel,
                HydroPipeMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPipeInfo visual,
                HydroPipeMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1638,14 +2359,14 @@
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Material = matching.Material;
            visual.Diameter = matching.Diameter;
            visual.Roughness = matching.Roughness;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Material = matching.Material;
            //visual.Diameter = matching.Diameter;
            //visual.Roughness = matching.Roughness;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
@@ -1653,31 +2374,61 @@
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingDiameter.HasValue)
                {
                    if (visual.Diameter != matching.MatchingDiameter.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Diameter), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Diameter = matching.MatchingDiameter.Value;
                    result = true;
                }
                if (matching.MatchingRoughness.HasValue)
                {
                    if (visual.Roughness != matching.MatchingRoughness.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Roughness), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Roughness = matching.MatchingRoughness.Value;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
@@ -1692,7 +2443,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroTranslationInfo visual, HydroTranslationMatchingViewModel matching)
        public static bool Apply
            (
                HydroTranslationViewModel visualViewModel,
                HydroTranslationMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroTranslationInfo visual,
                HydroTranslationMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1707,16 +2481,16 @@
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.Material = matching.Material;
            visual.Diameter = matching.Diameter;
            visual.StartDiameter = matching.StartDiameter;
            visual.EndDiameter = matching.EndDiameter;
            visual.Roughness = matching.Roughness;
            visual.MinorLoss = matching.MinorLoss;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.Material = matching.Material;
            //visual.Diameter = matching.Diameter;
            //visual.StartDiameter = matching.StartDiameter;
            //visual.EndDiameter = matching.EndDiameter;
            //visual.Roughness = matching.Roughness;
            //visual.MinorLoss = matching.MinorLoss;
            bool result = false;
@@ -1724,42 +2498,82 @@
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingMaterial))
                {
                    if (visual.Material != matching.MatchingMaterial)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Material), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Material = matching.MatchingMaterial;
                    result = true;
                }
                if (matching.MatchingDiameter.HasValue)
                {
                    if (visual.Diameter != matching.MatchingDiameter.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Diameter), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Diameter = matching.MatchingDiameter.Value;
                    result = true;
                }
                if (matching.MatchingStartDiameter.HasValue)
                {
                    visual.StartDiameter = matching.MatchingStartDiameter.Value;
                    result = true;
                }
                if (matching.MatchingEndDiameter.HasValue)
                {
                    visual.EndDiameter = matching.MatchingEndDiameter.Value;
                    result = true;
                }
                if (matching.MatchingRoughness.HasValue)
                {
                    if (visual.Roughness != matching.MatchingRoughness.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.Roughness), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.Roughness = matching.MatchingRoughness.Value;
                    result = true;
                }
                if (matching.MatchingMinorLoss.HasValue)
                {
                    if (visual.MinorLoss != matching.MatchingMinorLoss.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.MinorLoss), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.MinorLoss = matching.MatchingMinorLoss.Value;
                    result = true;
                }
                if (matching.MatchingStartDiameter.HasValue)
                {
                    if (visual.StartDiameter != matching.MatchingStartDiameter.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.StartDiameter), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.StartDiameter = matching.MatchingStartDiameter.Value;
                    result = true;
                }
                if (matching.MatchingEndDiameter.HasValue)
                {
                    if (visual.EndDiameter != matching.MatchingEndDiameter.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.EndDiameter), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.EndDiameter = matching.MatchingEndDiameter.Value;
                    result = true;
                }
            }
@@ -1773,7 +2587,30 @@
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo visual, HydroPumpMatchingViewModel matching)
        public static bool Apply
            (
                HydroPumpViewModel visualViewModel,
                HydroPumpMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPumpInfo visual,
                HydroPumpMatchingViewModel matching,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -1788,58 +2625,99 @@
                return false;
            }
            visual.Name = matching.Name;
            visual.DbLocked = matching.DbLocked;
            visual.DbId = matching.DbId;
            visual.ModelType = matching.ModelType;
            visual.RatedQ = matching.RatedQ;
            visual.RatedH = matching.RatedH;
            visual.RatedP = matching.RatedP;
            visual.RatedN = matching.RatedN;
            visual.RatedHz = matching.RatedHz;
            visual.SpeedRatio = matching.CurrentHz / visual.RatedHz;
            //visual.Name = matching.Name;
            //visual.DbLocked = matching.DbLocked;
            //visual.DbId = matching.DbId;
            //visual.ModelType = matching.ModelType;
            //visual.RatedQ = matching.RatedQ;
            //visual.RatedH = matching.RatedH;
            //visual.RatedP = matching.RatedP;
            //visual.RatedN = matching.RatedN;
            //visual.RatedHz = matching.RatedHz;
            //visual.SpeedRatio = matching.CurrentHz / visual.RatedHz;
            bool result = false;
            if (!visual.DbLocked)
            {
                if (!string.IsNullOrEmpty(matching.MatchingModelType))
                {
                    if (visual.ModelType != matching.MatchingModelType)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.ModelType), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.ModelType = matching.MatchingModelType;
                    result = true;
                }
                if (!string.IsNullOrEmpty(matching.MatchingDbId))
                {
                    if (visual.DbId != matching.MatchingDbId)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.DbId), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.DbId = matching.MatchingDbId;
                    result = true;
                }
                if (matching.MatchingRatedQ.HasValue)
                {
                    if (visual.RatedQ != matching.MatchingRatedQ.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RatedQ), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RatedQ = matching.MatchingRatedQ.Value;
                    result = true;
                }
                if (matching.MatchingRatedH.HasValue)
                {
                    if (visual.RatedH != matching.MatchingRatedH.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RatedH), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RatedH = matching.MatchingRatedH.Value;
                    result = true;
                }
                if (matching.MatchingRatedP.HasValue)
                {
                    if (visual.RatedP != matching.MatchingRatedP.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RatedP), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RatedP = matching.MatchingRatedP.Value;
                    result = true;
                }
                if (matching.MatchingRatedN.HasValue)
                {
                    if (visual.RatedN != matching.MatchingRatedN.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RatedN), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RatedN = matching.MatchingRatedN.Value;
                    result = true;
                }
                if (matching.MatchingRatedHz.HasValue)
                {
                    if (visual.RatedHz != matching.MatchingRatedHz.Value)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.RatedHz), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.RatedHz = matching.MatchingRatedHz.Value;
                    result = true;
                }
                if (matching.MatchingCurrentHz.HasValue)
                {
                    visual.SpeedRatio = matching.MatchingCurrentHz.Value / visual.RatedHz;
                    var speedRatio = matching.MatchingCurrentHz.Value / visual.RatedHz;
                    if (visual.SpeedRatio != speedRatio)
                    {
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.SpeedRatio), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                    }
                    visual.SpeedRatio = speedRatio;
                    result = true;
                }
@@ -1856,7 +2734,7 @@
                        curveqh.ModelType = string.Empty;
                        curveqh.DbLocked = false;
                        curveqh.DbId = matching.MatchingCurveDbId;
                        curveqh.CurveType = Yw.WinFrmUI.HydroCurve.PumpQH;
                        curveqh.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQH;
                        curveqh.CurveData = matching.MatchingCurveQH?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {
@@ -1864,6 +2742,9 @@
                        }
                        hydroInfo.Curves.Add(curveqh);
                        visual.CurveQH = curveqh.Code;
                        changeHelper?.Append(curveqh, eChangeType.Add);
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQH), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                        result = true;
                    }
                    else
@@ -1872,6 +2753,7 @@
                        {
                            curveqh.DbId = matching.MatchingCurveDbId;
                            curveqh.CurveData = matching.MatchingCurveQH?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                            changeHelper?.Append(curveqh, eChangeType.Update);
                            result = true;
                        }
                    }
@@ -1887,7 +2769,7 @@
                        curveqp.ModelType = string.Empty;
                        curveqp.DbLocked = false;
                        curveqp.DbId = matching.MatchingCurveDbId;
                        curveqp.CurveType = Yw.WinFrmUI.HydroCurve.PumpQP;
                        curveqp.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQP;
                        curveqp.CurveData = matching.MatchingCurveQP?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {
@@ -1895,6 +2777,9 @@
                        }
                        hydroInfo.Curves.Add(curveqp);
                        visual.CurveQP = curveqp.Code;
                        changeHelper?.Append(curveqp, eChangeType.Add);
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQP), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                        result = true;
                    }
                    else
@@ -1903,6 +2788,7 @@
                        {
                            curveqp.DbId = matching.MatchingCurveDbId;
                            curveqp.CurveData = matching.MatchingCurveQP?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                            changeHelper?.Append(curveqp, eChangeType.Update);
                            result = true;
                        }
                    }
@@ -1918,7 +2804,7 @@
                        curveqe.ModelType = string.Empty;
                        curveqe.DbLocked = false;
                        curveqe.DbId = matching.MatchingCurveDbId;
                        curveqe.CurveType = Yw.WinFrmUI.HydroCurve.PumpQE;
                        curveqe.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQE;
                        curveqe.CurveData = matching.MatchingCurveQE?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {
@@ -1926,6 +2812,9 @@
                        }
                        hydroInfo.Curves.Add(curveqe);
                        visual.CurveQE = curveqe.Code;
                        changeHelper?.Append(curveqe, eChangeType.Add);
                        changeHelper?.Append(visual, eChangeType.Update);
                        propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQE), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}通过产品配置匹配修改");
                        result = true;
                    }
                    else
@@ -1934,6 +2823,7 @@
                        {
                            curveqe.DbId = matching.MatchingCurveDbId;
                            curveqe.CurveData = matching.MatchingCurveQE?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                            changeHelper?.Append(curveqe, eChangeType.Update);
                            result = true;
                        }
                    }
@@ -1946,6 +2836,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>
        /// 应用
@@ -2062,7 +2962,7 @@
                                    curveol.ModelType = visual.ModelType;
                                    curveol.DbLocked = false;
                                    curveol.DbId = matching.MatchingCurveDbId;
                                    curveol.CurveType = Yw.WinFrmUI.HydroCurve.ValveOL;
                                    curveol.CurveType = Yw.WinFrmUI.HydroCurveType.CurveOL;
                                    curveol.CurveData = matching.MatchingCurveOL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                                    if (hydroInfo.Curves == null)
                                    {
@@ -2077,6 +2977,7 @@
                                    if (!curveol.DbLocked)
                                    {
                                        curveol.DbId = matching.MatchingCurveDbId;
                                        curveol.CurveType = Yw.WinFrmUI.HydroCurveType.CurveOL;
                                        curveol.CurveData = matching.MatchingCurveOL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                                        result = true;
                                    }
@@ -2088,7 +2989,7 @@
                        {
                            if (!string.IsNullOrEmpty(matching.MatchingCurveDbId))
                            {
                                //阀门开度损失系数曲线
                                //水头损失曲线
                                var curveql = hydroInfo.Curves?.Find(x => x.Code == visual.ValveSetting);
                                if (curveql == null)
                                {
@@ -2099,7 +3000,7 @@
                                    curveql.ModelType = visual.ModelType;
                                    curveql.DbLocked = false;
                                    curveql.DbId = matching.MatchingCurveDbId;
                                    curveql.CurveType = Yw.WinFrmUI.HydroCurve.ValveOL;
                                    curveql.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQL;
                                    curveql.CurveData = matching.MatchingCurveQL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                                    if (hydroInfo.Curves == null)
                                    {
@@ -2114,6 +3015,7 @@
                                    if (!curveql.DbLocked)
                                    {
                                        curveql.DbId = matching.MatchingCurveDbId;
                                        curveql.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQL;
                                        curveql.CurveData = matching.MatchingCurveQL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                                        result = true;
                                    }
@@ -2134,6 +3036,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>
        /// 应用
@@ -2201,7 +3113,7 @@
                        curvevql.ModelType = string.Empty;
                        curvevql.DbLocked = false;
                        curvevql.DbId = matching.MatchingCurveDbId;
                        curvevql.CurveType = Yw.WinFrmUI.HydroCurve.ExchangerQL;
                        curvevql.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQL;
                        curvevql.CurveData = matching.MatchingCurveQL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {
@@ -2228,6 +3140,16 @@
        #endregion
        #region 空压机
        /// <summary>
        /// 应用
        /// </summary>
        public static bool Apply(HydroCompressorViewModel visualViewModel, HydroCompressorMatchingViewModel matching)
        {
            var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching);
            visualViewModel.UpdateProperty();
            return bol;
        }
        /// <summary>
        /// 应用
@@ -2295,7 +3217,7 @@
                        curvevql.ModelType = string.Empty;
                        curvevql.DbLocked = false;
                        curvevql.DbId = matching.MatchingCurveDbId;
                        curvevql.CurveType = Yw.WinFrmUI.HydroCurve.CompressorQL;
                        curvevql.CurveType = Yw.WinFrmUI.HydroCurveType.CurveQL;
                        curvevql.CurveData = matching.MatchingCurveQL?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList();
                        if (hydroInfo.Curves == null)
                        {