lixiaojun
2024-12-10 31a8e93cf1cc708b68456b88aa5b0031a41eb47a
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,7 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -535,7 +546,25 @@
                        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
                {
                    switch (input.eAlgorithmType)
@@ -604,6 +633,7 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -611,6 +641,7 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -625,7 +656,6 @@
                    //取默认
                    if (defaultList.Count > 0)
                    {
                        isNotarize = true;
                        vmo = defaultList.First();
                    }
                    else if (defaultList.Count <= 0)
@@ -635,6 +665,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -721,6 +753,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -728,6 +762,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -751,6 +787,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -821,6 +859,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -828,6 +868,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -851,6 +893,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -919,6 +963,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -926,6 +972,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -949,6 +997,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1017,6 +1067,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1024,6 +1076,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1046,6 +1100,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1130,6 +1186,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1137,6 +1195,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1159,6 +1219,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1244,6 +1306,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1251,6 +1315,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1274,6 +1340,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1336,6 +1404,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1414,6 +1484,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1473,6 +1545,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1539,6 +1613,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1569,6 +1645,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1629,6 +1707,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1695,6 +1775,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else
@@ -1702,6 +1784,8 @@
            }
            else if (nameMatching.Count == 1)
            {
                isNotarize = true;
                vmo = nameMatching.First();
            }
            else
@@ -1724,6 +1808,8 @@
                }
                else if (absoluteMatching.Count == 1)
                {
                    isNotarize = true;
                    vmo = absoluteMatching.First();
                }
                else