From 5f51a2fe3461e1f88e75b0b6959719d25f657ef3 Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期二, 07 一月 2025 17:34:27 +0800
Subject: [PATCH] 曲线模块修改

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportCtrl.cs |   39 +++++++++++++++++++--------------------
 1 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportCtrl.cs
index 39d14ce..8c76058 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportCtrl.cs
@@ -30,7 +30,6 @@
         private HydroSingleWorkingLossCurveCtrl _lossCurve = null;
         private HydroSingleWorkingLossStatisticsCtrl _lossStatistics = null;
 
-
         private XhsProjectVmo _project = null;
         private Yw.Model.HydroModelInfo _hydroInfo = null;
         private List<HydroMonitorVmo> _allMonitorList = null;
@@ -76,7 +75,7 @@
             projectGroup.AllowBorderColorBlending = true;
             projectGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204);
 
-            #endregion
+            #endregion 椤圭洰淇℃伅
 
             #region 鑳借�楀垎鏋�
 
@@ -96,7 +95,7 @@
             energyGroup.AllowBorderColorBlending = true;
             energyGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204);
 
-            #endregion
+            #endregion 鑳借�楀垎鏋�
 
             #region 鎹熷け鏇茬嚎
 
@@ -116,7 +115,7 @@
             lossCurveGroup.AllowBorderColorBlending = true;
             lossCurveGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204);
 
-            #endregion
+            #endregion 鎹熷け鏇茬嚎
 
             #region 鎹熷け缁熻
 
@@ -136,13 +135,11 @@
             lossStatisticsGroup.AllowBorderColorBlending = true;
             lossStatisticsGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204);
 
-            #endregion
-
-
+            #endregion 鎹熷け缁熻
         }
 
         private const string _tempFoler = "workingImageTemp";
-        private const string _pumpAnalyImageFileName = "pump_analy.png";
+        private const string _energyAnalyImageFileName = "energy_analy.png";
         private const string _lossCurveImageFileName = "loss_curve.png";
         private const string _energyInputImageFileName = "energy_input.png";
         private const string _energyLossImageFileName = "energy_loss.png";
@@ -165,27 +162,27 @@
         /// <summary>
         /// 鑾峰彇瑙嗗浘
         /// </summary>
-        public async Task<SimulationWorkingReportViewModel> GetViewModel()
+        public async Task<HStation.ReportFile.SimulationWorkingReportViewModel> GetViewModel()
         {
-            var vm = new SimulationWorkingReportViewModel();
+            var vm = new HStation.ReportFile.SimulationWorkingReportViewModel();
             vm.ReportType = "妯℃嫙宸ュ喌杩愯鎶ュ憡";
-            vm.Info = new SimulationReportInfoItemViewModel()
+            vm.Info = new HStation.ReportFile.SimulationReportInfoItemViewModel()
             {
                 Name = _project.Name,
                 Description = _project.Description,
             };
-            vm.Pumps = new List<SimulationReportPumpItemViewModel>();
+            vm.Pumps = new List<HStation.ReportFile.SimulationReportPumpItemViewModel>();
             var pumps = _hydroInfo.Pumps;
             foreach (var pump in _hydroInfo.Pumps)
             {
-                var pumpItem = new SimulationReportPumpItemViewModel();
+                var pumpItem = new HStation.ReportFile.SimulationReportPumpItemViewModel();
                 pumpItem.Name = pump.Name;
                 pumpItem.ModelType = pumpItem.ModelType;
                 pumpItem.SerialNO = (_hydroInfo.Pumps.IndexOf(pump) + 1).ToString();
-                pumpItem.RatedQ = $"{pump.RatedQ ?? 0}m鲁/h";
-                pumpItem.RatedH = $"{pump.RatedH ?? 0}m";
+                pumpItem.RatedQ = $"{pump.RatedQ}m鲁/h";
+                pumpItem.RatedH = $"{pump.RatedH}m";
                 pumpItem.RatedP = $"{pump.RatedP}kW";
-                pumpItem.RatedN = $"{pump.RatedN ?? 0}r/min";
+                pumpItem.RatedN = $"{pump.RatedN}r/min";
                 vm.Pumps.Add(pumpItem);
                 var pumpDb = await BLLFactory<HStation.BLL.AssetsPumpMain>.Instance.GetByIDEx(long.Parse(pump.DbId));
                 if (pumpDb != null)
@@ -210,12 +207,14 @@
                     }
                 }
             }
-            vm.Working = new SimulationReportWorkingItemViewModel();
+            vm.Working = new HStation.ReportFile.SimulationReportWorkingItemViewModel();
             vm.Working.Name = _working.Name;
             if (string.IsNullOrEmpty(vm.Working.Name))
             {
                 vm.Working.Name = "褰撳墠璁$畻宸ュ喌";
             }
+            vm.Working.EnergyAnalyImagePath = GetImageFilePath(_energyAnalyImageFileName);
+            _workingChart.ExportToImage(vm.Working.EnergyAnalyImagePath);
             vm.Working.LossCurveImagePath = GetImageFilePath(_lossCurveImageFileName);
             _lossCurve.ExportToImage(vm.Working.LossCurveImagePath);
             vm.Working.EnergyInputImagePath = GetImageFilePath(_energyInputImageFileName);
@@ -225,9 +224,9 @@
             vm.Working.EnergyStatisticsImagePath = GetImageFilePath(_energyStatisticsImageFileName);
             _lossStatistics.ExportStatisticsToImage(vm.Working.EnergyStatisticsImagePath);
 
+            vm.PumpChart = new Yw.DiagramFile.PumpChartViewModel();
+
             return vm;
         }
-
-
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.3