From 8c68ab4be4bff7981e745cc2b41c7bba5257a2d3 Mon Sep 17 00:00:00 2001
From: ningshuxia <ningshuxia0927@outlook.com>
Date: 星期三, 16 四月 2025 20:37:38 +0800
Subject: [PATCH] 流量偏差 辅助类

---
 01-api/Application/IStation.Application/01-open-api/01-schedule/Schedule_Controller.cs |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/01-api/Application/IStation.Application/01-open-api/01-schedule/Schedule_Controller.cs b/01-api/Application/IStation.Application/01-open-api/01-schedule/Schedule_Controller.cs
index f88e17d..e81e700 100644
--- a/01-api/Application/IStation.Application/01-open-api/01-schedule/Schedule_Controller.cs
+++ b/01-api/Application/IStation.Application/01-open-api/01-schedule/Schedule_Controller.cs
@@ -18,6 +18,7 @@
         private static readonly Service.ScheduleConfig _service_schedule_config = new();
 
         private static readonly Service.AnalysisDeviation _service_analysis_deviation = new();
+        private static readonly Service.FlowDeviation _service_flow_deviation = new();
 
         /// <summary>
         /// 璁$畻
@@ -56,7 +57,8 @@
             var is_monitor_record_debug = false;
 #if DEBUG
             is_monitor_record_debug = true;
-#endif
+#endif      
+
 
             log_title = "瀹炴椂ZyScada璇锋眰";
             var get_msg = GlobalHelper.GetMonitorRecordList(receipt_time, out List<Model.MonitorRecord> monitor_record_list, is_monitor_record_debug);
@@ -104,17 +106,20 @@
             }
 
 
-            log_title = "璋冨害杩斿洖";
-            var msg = "璁$畻缁撴潫!";
-            var helper = new Service.ScheduleHelper();
+            log_title = "娴侀噺琛ュ樊";
 
+            var helper = new Service.ScheduleHelper(); 
             helper.Initial(station1_open_flag_list, station1_schedule_config, analysis_deviation_list);
             var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_flag_inlet_water_level_dict, target_flow1, target_pressure1);
 
 
-            helper.Initial(station2_open_flag_list, station2_schedule_config, analysis_deviation_list);
+            var station2_target_flow_diff=_service_flow_deviation.GetFlowDiff(target_pressure2);
+            ScheduleLog.Info(request_id, log_title, $"2杈撴按:{station2_target_flow_diff:N1}");
+            helper.Initial(station2_open_flag_list, station2_schedule_config, analysis_deviation_list,station2_target_flow_diff);
             var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_flag_inlet_water_level_dict, target_flow2, target_pressure2);
-
+            
+            log_title = "璋冨害杩斿洖";
+            var msg = "璁$畻缁撴潫!";
             var schedule_request = new Model.ScheduleRequest
             {
                 ID = request_id,

--
Gitblit v1.9.3