From 580201d86a324677a1d64a87c7ff79dceb27a58e Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期四, 05 十二月 2024 22:12:51 +0800
Subject: [PATCH] 阀门单独修改提交

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs |   93 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 90 insertions(+), 3 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs
index 1c71dcb..d065639 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs
@@ -345,6 +345,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -352,6 +354,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -375,6 +379,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -386,7 +392,7 @@
                 {
                     if (input.CurveDbId == null)
                     {
-                        if (vmo.ValveType == HStation.Assets.eValveType.GPV)
+                        if ((int)input.ValveType == (int)HStation.Assets.eValveType.GPV)
                         {
                             var curveList = Task.Run(async () => await new BLL.AssetsValveCoefficient().GetByMainID(vmo.ID)).Result;
                             if (curveList != null && curveList.Count > 0)
@@ -396,7 +402,7 @@
                                 input.MatchingCurveQL = pt_list;
                             }
                         }
-                        else if (vmo.ValveType == HStation.Assets.eValveType.TCV)
+                        else if ((int)vmo.ValveType == (int)HStation.Assets.eValveType.TCV)
                         {
                             var curveList = Task.Run(async () => await new BLL.AssetsValveCoefficient().GetByMainID(vmo.ID)).Result;
                             if (curveList != null && curveList.Count > 0)
@@ -490,6 +496,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -497,6 +505,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -520,6 +530,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -535,6 +547,24 @@
                         input.MatchingMaterial = vmo.Material;
                     if (input.MinorLoss < 0)
                         input.MatchingMinorLoss = vmo.MinorLoss;
+                    switch (input.eAlgorithmType)
+                    {
+                        case eAlgorithmType.Hazen:
+                            input.MatchingRoughness = vmo.Hazen;
+                            break;
+
+                        case eAlgorithmType.Manning:
+                            input.MatchingRoughness = vmo.Manning;
+                            break;
+
+                        case eAlgorithmType.Darcy:
+                            input.MatchingRoughness = vmo.Darcy;
+                            break;
+
+                        default:
+                            input.MatchingRoughness = vmo.Hazen;
+                            break;
+                    }
                 }
                 else
                 {
@@ -604,6 +634,7 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -611,6 +642,7 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
                 vmo = nameMatching.First();
             }
             else
@@ -625,7 +657,6 @@
                     //鍙栭粯璁�
                     if (defaultList.Count > 0)
                     {
-                        isNotarize = true;
                         vmo = defaultList.First();
                     }
                     else if (defaultList.Count <= 0)
@@ -635,6 +666,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -721,6 +754,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -728,6 +763,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -751,6 +788,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -821,6 +860,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -828,6 +869,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -851,6 +894,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -919,6 +964,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -926,6 +973,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -949,6 +998,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1017,6 +1068,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1024,6 +1077,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1046,6 +1101,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1130,6 +1187,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1137,6 +1196,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1159,6 +1220,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1244,6 +1307,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1251,6 +1316,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1274,6 +1341,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1336,6 +1405,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1414,6 +1485,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1473,6 +1546,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1539,6 +1614,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1569,6 +1646,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1629,6 +1708,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1695,6 +1776,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else
@@ -1702,6 +1785,8 @@
             }
             else if (nameMatching.Count == 1)
             {
+                isNotarize = true;
+
                 vmo = nameMatching.First();
             }
             else
@@ -1724,6 +1809,8 @@
                 }
                 else if (absoluteMatching.Count == 1)
                 {
+                    isNotarize = true;
+
                     vmo = absoluteMatching.First();
                 }
                 else

--
Gitblit v1.9.3