From 81890c425d1d4217c5210c65c915a670b4326628 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 14 一月 2025 17:06:04 +0800 Subject: [PATCH] 修复现存报错 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs | 32 +++++++++++--------------------- 1 files changed, 11 insertions(+), 21 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 5509503..0c7605b 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 @@ -417,7 +417,6 @@ { input.MatchingValveSetting = valve.ValveSetting; } - input.MatchingValveType = (Yw.WinFrmUI.eValveType)(int)valve.ValveType; if (input.CurveDbId == null) { var list = Task.Run(async () => @@ -427,26 +426,21 @@ var def = list.OrderByDescending(x => x.Importance).First(); input.MatchingCurveDbId = def.ID.ToString(); var curve = def.Diagram.GraphList[0].GetFeatPointList(); - if (valve.ValveType == HStation.Assets.eValveType.GPV) + input.MatchingCurveQL = new List<HydroCurvePointViewModel>(); + /* foreach (var item in curve) + { + input.MatchingCurveQL.Add(new HydroCurvePointViewModel(item.X, item.Y)); + }*/ + + input.MatchingCurveOL = new List<HydroCurvePointViewModel>(); + foreach (var item in curve) { - input.MatchingCurveQL = new List<HydroCurvePointViewModel>(); - foreach (var item in curve) - { - input.MatchingCurveQL.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - } - else if (valve.ValveType == HStation.Assets.eValveType.TCV) - { - input.MatchingCurveOL = new List<HydroCurvePointViewModel>(); - foreach (var item in curve) - { - input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } + input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y)); } } + return true; } - - return true; + return false; } //绠¢亾鍖归厤 @@ -1970,10 +1964,6 @@ if (input.StartDiameter < 0) { input.MatchingStartDiameter = translation.StartDiameter; - } - if (input.Diameter < 0) - { - input.MatchingDiameter = translation.Diameter; } return true; -- Gitblit v1.9.3