From 80ec78f9c85466b09ac4a4101d5073c26f37021e Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期一, 06 一月 2025 09:14:32 +0800 Subject: [PATCH] 水力计算bug修复 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs index 4275055..d790851 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs @@ -402,7 +402,6 @@ } } } - var valve = dict.OrderBy(x => x.Value).LastOrDefault().Key; input.MatchingDbId = valve.ID.ToString(); if (string.IsNullOrEmpty(input.ModelType)) @@ -425,6 +424,7 @@ { input.MatchingValveSetting = valve.ValveSetting; } + input.MatchingValveType = (Yw.WinFrmUI.eValveType)(int)valve.ValveType; if (input.CurveDbId == null) { var list = Task.Run(async () => @@ -558,17 +558,14 @@ { input.MatchingModelType = pipe.Name; } - if (input.Roughness == 0) - { - input.MatchingRoughness = pipe.Hazen; - } + if (string.IsNullOrEmpty(input.Material)) { input.MatchingMaterial = pipe.Material; } if (input.MinorLoss < 0) { - input.MatchingMinorLoss = pipe.MinorLoss; + input.MatchingMinorLoss = pipe.Hazen; } return true; @@ -684,10 +681,7 @@ { input.Caliber = threelink.Caliber ?? 0; } - if (input.MinorLoss <= 0) - { - input.MatchingMinorLoss = threelink.MinorLoss; - } + if (input.RunningThroughLoss <= 0) { input.MatchingRunningThroughLoss = threelink.RunThroughMinorLoss; @@ -930,7 +924,7 @@ } if (input.MinorLoss <= 0) { - input.MatchingMinorLoss = sprinkler.MinorLoss; + input.MatchingMinorLoss = sprinkler.FlowMinorLoss; } return true; @@ -2055,7 +2049,6 @@ } } } - // 鍏抽敭瀛� int keywordWeight = 1; -- Gitblit v1.9.3