| | |
| | | public shyséèæ²åæ°´() |
| | | { |
| | | this._corpID = 4; |
| | | this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_éè¡äºè¾(); |
| | | this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General (); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | return "æªç¥æµç¹"; |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// æ ¹æ®ä¸é«æä¾çåæ°,æå»ºè°åº¦åææéçåæ°, (è¿ä¸ªæ¯ä¸ªæ³µç«é½ä¸ä¸æ ·) |
| | | ///// </summary> |
| | | ///// <param name="allRecords_hour"></param> |
| | | ///// <param name="error_info"></param> |
| | | ///// <returns></returns> |
| | | //protected override DispatchAna.Model.RequestParasComplex BuildDispatchAnaRequest( |
| | | // List<IStation.Dto.MonitorRecord4SG> allRecords_hour, |
| | | // out string error_info) |
| | | //{ |
| | | // if (allRecords_hour == null || allRecords_hour.Count == 0) |
| | | // { |
| | | // error_info = "éè¡äºè¾æµç¹æ°æ®ä¸ºç©º"; |
| | | // return null; |
| | | // } |
| | | // var complex_dispatch_request = new DispatchAna.Model.RequestParasComplex(); |
| | | // var water_level = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´åæ± æ¶²ä½.Item1); |
| | | // if (water_level == null) |
| | | // { |
| | | // water_level = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´åæ± æ¶²ä½.Item1); |
| | | // if (water_level == null) |
| | | // { |
| | | // error_info = "éè¡äºè¾æ°´åºæ¶²ä½æµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | // } |
| | | // var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡1ç¬æ¶æµé.Item1); |
| | | // if (pipe1_flow == null) |
| | | // { |
| | | // error_info = "éè¡äºè¾æ°´ç®¡é1æµéæµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | // var pipe2_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2ç¬æ¶æµé.Item1); |
| | | // if (pipe2_flow == null) |
| | | // { |
| | | // error_info = "éè¡äºè¾æ°´ç®¡é2æµéæµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | // var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡1åå.Item1); |
| | | // if (pipe1_press == null) |
| | | // { |
| | | // error_info = "éè¡äºè¾æ°´ç®¡é1ååæµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | // var pipe2_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2åå.Item1); |
| | | // if (pipe2_press == null) |
| | | // { |
| | | // error_info = "éè¡äºè¾æ°´ç®¡é2ååæµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | /// <summary> |
| | | /// æ ¹æ®ä¸é«æä¾çåæ°,æå»ºè°åº¦åææéçåæ°, (è¿ä¸ªæ¯ä¸ªæ³µç«é½ä¸ä¸æ ·) |
| | | /// </summary> |
| | | /// <param name="allRecords_hour"></param> |
| | | /// <param name="error_info"></param> |
| | | /// <returns></returns> |
| | | protected override DispatchAna.Model.RequestParasComplex BuildDispatchAnaRequest( |
| | | List<IStation.Dto.MonitorRecord4SG> allRecords_hour, |
| | | out string error_info) |
| | | { |
| | | if (allRecords_hour == null || allRecords_hour.Count == 0) |
| | | { |
| | | error_info = "éèæ²åæ°´æ³µæ¿æµç¹æ°æ®ä¸ºç©º"; |
| | | return null; |
| | | } |
| | | var complex_dispatch_request = new DispatchAna.Model.RequestParasComplex(); |
| | | var water_level = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´é¿æ±æ°´ä½.Item1); |
| | | if (water_level == null) |
| | | { |
| | | |
| | | error_info = "éèæ²åæ°´æ³µæ¿æ°´åºé¿æ±æ°´ä½æµç¹æªæ¾å°"; |
| | | return null; |
| | | |
| | | } |
| | | var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´ç¬æ¶æµé.Item1); |
| | | if (pipe1_flow == null) |
| | | { |
| | | error_info = "éèæ²åæ°´æ³µæ¿æ°´ç®¡é æµéæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´åå.Item1); |
| | | if (pipe1_press == null) |
| | | { |
| | | error_info = "éèæ²åæ°´æ³µæ¿æ°´ç®¡éåºæ°´ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // complex_dispatch_request.CorpID = this._corpID; |
| | | // complex_dispatch_request.StationID = this._stationID; |
| | | // complex_dispatch_request.SchemeNumber = 1; |
| | | // complex_dispatch_request.PressValueType = DispatchAna.Model.RequestParasComplex.ePressValueType.åå; |
| | | // complex_dispatch_request.InletPipePara = new List<DispatchAna.Model.InletPipePara>() |
| | | // { |
| | | // new DispatchAna.Model.InletPipePara(){ Name="æ°´æ± ", Value = water_level.RecordValue} |
| | | // }; |
| | | // complex_dispatch_request.OutletPipePara = new List<DispatchAna.Model.OutletPipePara>(); |
| | | // complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | // { |
| | | // Name = "ä¸å·ç®¡è·¯", |
| | | // TargetFlow = pipe1_flow.RecordValue, |
| | | // TargetPress = pipe1_press.RecordValue, |
| | | // }); |
| | | // complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | // { |
| | | // Name = "äºå·ç®¡è·¯", |
| | | // TargetFlow = pipe2_flow.RecordValue, |
| | | // TargetPress = pipe2_press.RecordValue, |
| | | // }); |
| | | |
| | | // complex_dispatch_request.ValvePara = new List<DispatchAna.Model.ValvePara>(); |
| | | // complex_dispatch_request.ValvePara.Add(new DispatchAna.Model.ValvePara() { Name = "ä¸é´éé¨", OpenStatus = 1 }); |
| | | complex_dispatch_request.CorpID = this._corpID; |
| | | complex_dispatch_request.StationID = this._stationID; |
| | | complex_dispatch_request.SchemeNumber = 1; |
| | | complex_dispatch_request.PressValueType = DispatchAna.Model.RequestParasComplex.ePressValueType.åå; |
| | | complex_dispatch_request.InletPipePara = new List<DispatchAna.Model.InletPipePara>() |
| | | { |
| | | new DispatchAna.Model.InletPipePara(){ Name="æ°´æ± ", Value = water_level.RecordValue} |
| | | }; |
| | | complex_dispatch_request.OutletPipePara = new List<DispatchAna.Model.OutletPipePara>(); |
| | | complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | { |
| | | Name = "ä¸å·ç®¡è·¯", |
| | | TargetFlow = pipe1_flow.RecordValue, |
| | | TargetPress = pipe1_press.RecordValue, |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // error_info = null; |
| | | // return complex_dispatch_request; |
| | | //} |
| | | error_info = null; |
| | | return complex_dispatch_request; |
| | | } |
| | | |
| | | |
| | | } |