tangxu
2023-04-21 473084031d410d95db66e81f4d1761f9a2d1b8e5
Calculation/IStation.Calculation.Dispatch/custom/shys/station/³¤Ð˵º/KeepStatus.cs
@@ -13,8 +13,6 @@
    {
        public Calculator_KeepStatus_SHYS_长兴岛()
        {
            _corpID = 4;
            _stationID = 2;
        }
        Model.RequestParasComplex _request_paras;
        List<long> _open_machine_IdList ;
@@ -41,10 +39,8 @@
        /// </summary> 
        /// <param name="error_info">错误信息</param>
        /// <returns></returns>
        public    Model.AnaScheme Calc ( out string error_info)
        public Model.AnaScheme Calc(out string error_info)
        {
            _corpID = 4;
            _stationID = 2;
            if (_open_machine_IdList == null || _open_machine_IdList.Count == 0)
            {
                error_info = "ERROR 25";
@@ -74,9 +70,9 @@
            double water_level = 0;//水位
            if (_request_paras.WaterLevelPara != null && _request_paras.WaterLevelPara.Count > 0)
            if (_request_paras.InletPipePara != null && _request_paras.InletPipePara.Count > 0)
            {
                water_level = _request_paras.WaterLevelPara.First().Value;
                water_level = _request_paras.InletPipePara.First().Value;
            }
@@ -116,18 +112,15 @@
                    new Common.DispatchAnaGeneralHelper压力();
                calc_pipe_helper.InitialParas(
                    pipe1_TargetFlow + pipe2_TargetFlow,
                    water_level,
                  press,
                  null, null,
                  allMachineList, null);
                    water_level, true,
                    press, false,
                    null, null,
                    allMachineList, null, out error_info);
                return calc_pipe_helper.CalcKeepStatus(_open_machine_IdList);
            }
            else //阀门关的状态下  ä¸¤ç®¡ç›¸è¿žæ•°æ®ç›¸åŠ 
            {
                var pipe1_machineIds = new List<long>() { 19, 22 };//1号泵,2号泵
                var pipe2_machineIds = new List<long>() { 25, 28 };//3号泵,4号泵
                Common.DispatchAnaGeneralHelper压力 calc_pipe1_helper
                    = new Common.DispatchAnaGeneralHelper压力();
@@ -138,10 +131,10 @@
                {//只开一号泵二号泵   
                    calc_pipe1_helper.InitialParas(
                        pipe1_TargetFlow,
                        water_level,
                        pipe1_TargetPess,
                        water_level, true,
                        pipe1_TargetPess, false,
                        null, null,
                        (from x in allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), null);
                        (from x in allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), null, out error_info);
                    return calc_pipe1_helper.CalcKeepStatus(_open_machine_IdList);
                }
@@ -149,10 +142,10 @@
                {
                    calc_pipe2_helper.InitialParas(
                        pipe2_TargetFlow,
                        water_level,
                        pipe2_TargetPess,
                        water_level, true,
                        pipe2_TargetPess, false,
                        null, null,
                        (from x in allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), null);
                        (from x in allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), null, out error_info);
                    return calc_pipe2_helper.CalcKeepStatus(_open_machine_IdList);
                }
@@ -162,19 +155,19 @@
                calc_pipe1_helper.InitialParas(
                    pipe1_TargetFlow,
                    water_level,
                    pipe1_TargetPess,
                    water_level, true,
                    pipe1_TargetPess, false,
                     null, null,
                    (from x in allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), null);
                    (from x in allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), null, out error_info);
                var pipe1_result = calc_pipe1_helper.CalcKeepStatus(_open_machine_IdList);
                calc_pipe2_helper.InitialParas(
                    pipe2_TargetFlow,
                    water_level,
                    pipe2_TargetPess,
                    water_level,true ,
                    pipe2_TargetPess,false ,
                    null, null,
                    (from x in allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), null);
                    (from x in allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), null, out error_info);
                var pipe2_result = calc_pipe2_helper.CalcKeepStatus(_open_machine_IdList);