From bd22bdd103feffefe7011c495fd0b43fb909dc84 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 22 一月 2025 14:10:48 +0800 Subject: [PATCH] 阀门匹配修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs | 33 +++++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 4 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 cdd8bd7..1c5abe5 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 @@ -1,4 +1,8 @@ -锘縩amespace HStation.WinFrmUI +锘縰sing DevExpress.CodeParser; +using System.Text.Json; +using Yw.Ahart; + +namespace HStation.WinFrmUI { public class AssetsMatchingHelper { @@ -421,7 +425,8 @@ { var def = list.OrderByDescending(x => x.Importance).First(); input.MatchingCurveDbId = def.ID.ToString(); - var curve = def.Diagram.GraphList[0].GetFeatPointList(); + //var curve = def.Diagram.GraphList[0].GetFeatPointList(); + //var curve1 = def.Diagram.GraphList[1].GetFeatPointList(); //input.MatchingCurveQL = new List<HydroCurvePointViewModel>(); /* foreach (var item in curve) { @@ -429,9 +434,29 @@ }*/ input.MatchingCurveOL = new List<HydroCurvePointViewModel>(); - foreach (var item in curve) + input.MatchingCurvesQL = new List<HydroFactorCurveViewModel>(); + for (int i = 0; i < def.Diagram.GraphList.Count; i++) { - input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y)); + var curve = def.Diagram.GraphList[i].GetFeatPointList(); + if (def.Diagram.GraphList[i].GraphType == 11) + { + var opening = Yw.WinFrmUI.PhartGraphHelper.GetGraphParas<Yw.WinFrmUI.Phart.QLGraphParasViewModel>((Yw.Ahart.eCurveType)def.Diagram.GraphList[i].GraphType, def.Diagram.GraphList[i].GraphParas); + var model = new HydroFactorCurveViewModel(); + model.CurveFactor = opening.Opening; + model.CurveData = new List<HydroCurvePointViewModel>(); + foreach (var item in curve) + { + model.CurveData.Add(new HydroCurvePointViewModel(item.X, item.Y)); + } + input.MatchingCurvesQL.Add(model); + } + else if (def.Diagram.GraphList[i].GraphType == 12) + { + foreach (var item in curve) + { + input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y)); + } + } } } return true; -- Gitblit v1.9.3