From 049f546f25cabfb5b08e29c54f49d61a544b0395 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 10 九月 2024 10:36:24 +0800 Subject: [PATCH] 升级前备份 --- IStation.Application/01-ch/01-schedule/Schedule_Controller.cs | 39 +++++++++++++++++++-------------------- 1 files changed, 19 insertions(+), 20 deletions(-) diff --git a/IStation.Application/01-ch/01-schedule/Schedule_Controller.cs b/IStation.Application/01-ch/01-schedule/Schedule_Controller.cs index 0f70b59..7779551 100644 --- a/IStation.Application/01-ch/01-schedule/Schedule_Controller.cs +++ b/IStation.Application/01-ch/01-schedule/Schedule_Controller.cs @@ -67,8 +67,6 @@ var station1 = station_info.Station1; var station2 = station_info.Station2; - var station1_same_type_flag_group_first = GlobalHelper.Station1SameTypeFlagGroupFirst; - var station2_same_type_flag_group_first = GlobalHelper.Station2SameTypeFlagGroupFirst; var station1_schedule_config = _service_schedule_config.GetStation1(); var station2_schedule_config = _service_schedule_config.GetStation2(); var station1_flag_list = GlobalHelper.Station1FlagList; @@ -98,11 +96,11 @@ var helper = new Algorithm.ScheduleHelper(); helper.Initial(station1_open_flag_list, station1_schedule_config); - var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_same_type_flag_group_first, station1_flag_inlet_water_level_dict, target_flow1, target_head1); + var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_flag_inlet_water_level_dict, target_flow1, target_head1); helper.Initial(station2_open_flag_list, station2_schedule_config); - var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_same_type_flag_group_first, station2_flag_inlet_water_level_dict, target_flow2, target_head2); + var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_flag_inlet_water_level_dict, target_flow2, target_head2); var schedule_request = new Model.ScheduleRequest { @@ -143,7 +141,7 @@ RequestID = request_id, Station = IStation.eDockingStation.Ch1s, TotalFlow = optimal_combine1.TotalFlow, - TotalHead = optimal_combine1.TotalHead, + TotalPressure = optimal_combine1.TotalPressure, TotalPower = optimal_combine1.TotalPower, TotalEfficiency = optimal_combine1.TotalEfficiency, WP = optimal_combine1.WP, @@ -154,7 +152,7 @@ schedule_pump_list1 = new List<Model.SchedulePump>(); output.objects["1杈撴按鎬绘祦閲�"] = optimal_combine1.TotalFlow; - output.objects["1杈撴按鎬诲帇鍔�"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine1.TotalHead), 4); + output.objects["1杈撴按鎬诲帇鍔�"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine1.TotalPressure), 4); output.objects["1杈撴按鎬诲姛鐜�"] = optimal_combine1.TotalPower; output.objects["1杈撴按鎬绘晥鐜�"] = optimal_combine1.TotalEfficiency; output.objects["1杈撴按鎬诲崈鍚ㄨ兘鑰�"] = optimal_combine1.WP; @@ -165,7 +163,7 @@ output.objects[$"1杈撴按{flag}#娴侀噺"] = fre_pump.Flow; output.objects[$"1杈撴按{flag}#鎵▼"] = fre_pump.Head; output.objects[$"1杈撴按{flag}#鍔熺巼"] = fre_pump.Power; - output.objects[$"1杈撴按{flag}#鏁堢巼"] = fre_pump.Efficiency; + output.objects[$"1杈撴按{flag}#鏁堢巼"] = fre_pump.Eff; output.objects[$"1杈撴按{flag}#棰戠巼"] = fre_pump.Frequency; output.objects[$"1杈撴按{flag}#杞��"] = fre_pump.Speed; @@ -222,10 +220,11 @@ Flag = flag, Flow = fre_pump.Flow, Head = fre_pump.Head, + PressureDiff = fre_pump.PressureDiff, Power = fre_pump.Power, - Efficiency = fre_pump.Efficiency, - Frequency = fre_pump.Frequency, - Speed = fre_pump.Speed + Efficiency = fre_pump.Eff, + Hz = fre_pump.Frequency, + Rpm = fre_pump.Speed }; schedule_pump_list1.Add(schedule_pump); @@ -246,7 +245,7 @@ RequestID = request_id, Station = IStation.eDockingStation.Ch2s, TotalFlow = optimal_combine2.TotalFlow, - TotalHead = optimal_combine2.TotalHead, + TotalPressure = optimal_combine2.TotalPressure, TotalPower = optimal_combine2.TotalPower, TotalEfficiency = optimal_combine2.TotalEfficiency, WP = optimal_combine2.WP, @@ -257,7 +256,7 @@ schedule_pump_list2 = new List<Model.SchedulePump>(); output.objects["2杈撴按鎬绘祦閲�"] = optimal_combine2.TotalFlow; - output.objects["2杈撴按鎬诲帇鍔�"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine2.TotalHead), 4); + output.objects["2杈撴按鎬诲帇鍔�"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine2.TotalPressure), 4); output.objects["2杈撴按鎬诲姛鐜�"] = optimal_combine2.TotalPower; output.objects["2杈撴按鎬绘晥鐜�"] = optimal_combine2.TotalEfficiency; output.objects["2杈撴按鎬诲崈鍚ㄨ兘鑰�"] = optimal_combine2.WP; @@ -269,7 +268,7 @@ output.objects[$"2杈撴按{flag}#娴侀噺"] = fre_pump.Flow; output.objects[$"2杈撴按{flag}#鎵▼"] = fre_pump.Head; output.objects[$"2杈撴按{flag}#鍔熺巼"] = fre_pump.Power; - output.objects[$"2杈撴按{flag}#鏁堢巼"] = fre_pump.Efficiency; + output.objects[$"2杈撴按{flag}#鏁堢巼"] = fre_pump.Eff; output.objects[$"2杈撴按{flag}#棰戠巼"] = fre_pump.Frequency; output.objects[$"2杈撴按{flag}#杞��"] = fre_pump.Speed; @@ -321,10 +320,11 @@ Flag = flag, Flow = fre_pump.Flow, Head = fre_pump.Head, + PressureDiff = fre_pump.PressureDiff, Power = fre_pump.Power, - Efficiency = fre_pump.Efficiency, - Frequency = fre_pump.Frequency, - Speed = fre_pump.Speed + Efficiency = fre_pump.Eff, + Hz = fre_pump.Frequency, + Rpm = fre_pump.Speed }; schedule_pump_list2.Add(schedule_pump); } @@ -443,19 +443,18 @@ Log.Debug(request_id, log_title, JsonHelper.Object2Json(schedule_pump_list2)); } } - - + var t = new System.Timers.Timer(); t.Interval = 10 * 60 * 1000; t.Elapsed += (s, e) => - { + { log_title = "瀹炴椂ZyScada璇锋眰(璋冨害鍚�10鍒嗛挓楠岃瘉)"; var get_msg = GlobalHelper.GetRealTimeZyScadaList(out List<Model.ZyScada> zy_scada_list, is_zy_scada_debug); if (!string.IsNullOrEmpty(get_msg)) { Log.Info(request_id, log_title, get_msg); } - Log.Debug(request_id, log_title, JsonHelper.Object2Json(zy_scada_list)); + Log.Debug(request_id, log_title, JsonHelper.Object2Json(zy_scada_list)); }; t.AutoReset = false; t.Start(); -- Gitblit v1.9.3