Shuxia Ning
2024-08-06 1d5b344c8be498c9989f3fe2e9846b1dcc919cb8
IStation.Application/01-ch/01-schedule/Schedule_Controller.cs
ÎļþÃû´Ó IStation.Application/01-ch/02-schedule/Schedule_Controller.cs ÐÞ¸Ä
@@ -1,13 +1,11 @@
using static IStation.Algorithm.ScheduleHelper;
namespace IStation.Application
namespace IStation.Application
{
    /// <summary>
    /// é™ˆè¡Œè¾“水调度
    /// </summary>
    [AllowAnonymous]
    [Route("OpenApi/Dispatch/Solution")]
    [ApiDescriptionSettings("Schedule", Name = "输水调度", Order = 1)]
    [ApiDescriptionSettings("Schedule", Name = "调度", Order = 1000)]
    public class Schedule_Controller : IDynamicApiController, ITransient
    {
        private readonly Service.ScheduleRequest _service_schedule_request = new();
@@ -79,7 +77,7 @@
            GlobalHelper.GetStationOpenFlagList(zy_scada_list, out List<int> station1_open_flag_list, out List<int> station2_open_flag_list);
            GlobalHelper.GetStationMaintenanceFlagList(zy_scada_list, out List<int> station1_maintenance_flag_list, out List<int> station2_maintenance_flag_list);
            GlobalHelper.GetFlagInletWaterLevelDict(zy_scada_list, out Dictionary<int, double> station1_flag_inlet_water_level_dict, out Dictionary<int, double> station2_flag_inlet_water_level_dict);
            GlobalHelper.GetFlagCumulativeRunTimeDict(out Dictionary<int, double> station1_flag_cumulative_run_time_dict, out Dictionary<int, double> station2_flag_cumulative_run_time_dict);
            //GlobalHelper.GetFlagCumulativeRuntimeDict(out Dictionary<int, double> station1_flag_cumulative_run_time_dict, out Dictionary<int, double> station2_flag_cumulative_run_time_dict);
            log_title = "机泵检修";
            if (station1_maintenance_flag_list != null && station1_maintenance_flag_list.Any())
@@ -100,11 +98,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, station1_flag_cumulative_run_time_dict, target_flow1, target_head1);
            var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_same_type_flag_group_first, 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, station2_flag_cumulative_run_time_dict, target_flow2, target_head2);
            var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_same_type_flag_group_first, station2_flag_inlet_water_level_dict, target_flow2, target_head2);
            var schedule_request = new Model.ScheduleRequest
            {