From ad8f813f5eddd66740b4e09801e4ea02ddf70a4a Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 19 二月 2025 15:58:22 +0800
Subject: [PATCH] 继续优化报表

---
 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/XhsValveMainPhartMinorLossPanel.cs |   65 +++++++++++++++-----------------
 1 files changed, 31 insertions(+), 34 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/XhsValveMainPhartMinorLossPanel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/XhsValveMainPhartMinorLossPanel.cs
index 832121a..83b9541 100644
--- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/XhsValveMainPhartMinorLossPanel.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/XhsValveMainPhartMinorLossPanel.cs
@@ -9,13 +9,11 @@
         {
             InitializeComponent();
             this.PageTitle.Caption = "闃�闂ㄦ崯澶辩郴鏁版洸绾�";
-
-            this.xhsValveMainPhartListCtrl1.FocusedChangedEvent += XhsValveMainPhartListCtrl1_FocusedChangedEvent;
         }
 
         private long _valve_main_id;
-        private Vmo.AssetsValveCoefficientVmo _xhs_phart_diagram_ex_std_dto = null;
-        private readonly BLL.AssetsValveCoefficient _bll = new();
+        private Vmo.AssetsValveFactorVmo _xhs_phart_diagram_ex_std_dto = null;
+        private readonly BLL.AssetsValveFactor _bll = new();
 
         /// <summary>
         /// 鍒濆鍖栨暟鎹�
@@ -25,11 +23,10 @@
             _valve_main_id = valve_main_id;
             if (_valve_main_id < 1)
             {
-                this.xhsValveMainPhartListCtrl1.Clear();
                 return;
             }
             //this.xhsValveMainPhartListCtrl1.SetBindingData(valve_main_id);
-            var chart = await new BLL.AssetsValveCoefficient().GetByMainID(valve_main_id);
+            var chart = await new BLL.AssetsValveFactor().GetByMainID(valve_main_id);
             if (chart.Count > 0)
             {
                 _xhs_phart_diagram_ex_std_dto = chart.First();
@@ -39,7 +36,7 @@
         }
 
         //閫夋嫨鏇茬嚎鍙樻崲浜嬩欢
-        private void XhsValveMainPhartListCtrl1_FocusedChangedEvent(Vmo.AssetsValveCoefficientVmo obj)
+        private void XhsValveMainPhartListCtrl1_FocusedChangedEvent(Vmo.AssetsValveFactorVmo obj)
         {
             _xhs_phart_diagram_ex_std_dto = obj;
             this.xtrPerform2dChart1.SetBindingData(obj.MinorLossCurve);
@@ -49,37 +46,37 @@
         #region 鍥捐〃
 
         //鍒濆鍖栧浘琛ㄦ暟鎹�
-        private void InitChart(Vmo.XhsValveMainPhartMappingExtensions dto)
+        private void InitChart(Vmo.PhartDiagramRelationExtensionsVmo dto)
         {
-            if (dto == null)
-            {
-                return;
-            }
-            var diagram = dto.Diagram;
-            if (diagram == null)
-            {
-                return;
-            }
-            var graph_list = diagram.GraphList;
-            if (graph_list == null || !graph_list.Any())
-            {
-                return;
-            }
+            /*   if (dto == null)
+               {
+                   return;
+               }
+               var diagram = dto.Diagram;
+               if (diagram == null)
+               {
+                   return;
+               }
+               var graph_list = diagram.GraphList;
+               if (graph_list == null || !graph_list.Any())
+               {
+                   return;
+               }
 
-            var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveOL);
-            if (graph_ql == null)
-            {
-                return;
-            }
+               var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.OL);
+               if (graph_ql == null)
+               {
+                   return;
+               }
 
-            List<Yw.Geometry.Point2d> points_ql = null;
-            points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null);
+               List<Yw.Geometry.Point2d> points_ql = null;
+               points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null);
 
-            var cubic_spline_ql = new Yw.Geometry.CubicSpline2d(points_ql);
+               var cubic_spline_ql = new Yw.Geometry.CubicSpline2d(points_ql);
 
-            var disp_paras = diagram.DispParas;
-            var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras);
-            this.xtrPerform2dChart1.SetBindingData(cubic_spline_ql.ToDbString(), disp_paras, is_calc_disp_paras);
+               var disp_paras = diagram.DispParas;
+               var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras);
+               this.xtrPerform2dChart1.SetBindingData(cubic_spline_ql.ToDbString(), disp_paras, is_calc_disp_paras);*/
         }
 
         //娓呯┖鍥捐〃鏁版嵁
@@ -113,7 +110,7 @@
                 XtraMessageBox.Show("ValveMain is null!");
                 return false;
             }
-            var model = new Vmo.AssetsValveCoefficientVmo();
+            var model = new Vmo.AssetsValveFactorVmo();
             model.MainID = _valve_main_id;
             model.OpenLossCurve = pt_list_json;
             this.xtrPerform2dChart1.SetBindingData(pt_list_json);

--
Gitblit v1.9.3