| | |
| | | /// <summary> |
| | | /// æµç¹åå
¸(è¿ä¸ªæ¯ä¸ªæ³µç«é½ä¸ä¸æ ·) |
| | | /// </summary> |
| | | |
| | | |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1åå = new Tuple<string, long>("_0402010503030107003", 739); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1ç¬æ¶æµé = new Tuple<string, long>("_0402010503030102003", 740); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2åå = new Tuple<string, long>("_0402010503030207004", 742); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2ç¬æ¶æµé = new Tuple<string, long>("_0402010503030202003", 743); |
| | | private Tuple<string, long> monitorè¿æ°´æ»ç®¡1åå = new Tuple<string, long>("_0402010503030107001", 733); |
| | | private Tuple<string, long> monitorè¿æ°´æ»ç®¡2åå = new Tuple<string, long>("_0402010503030207002", 736); |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="tagname"></param> |
| | | /// <returns></returns> |
| | | public override bool Isæ¶²ä½Monitor(string tagname) |
| | | { |
| | | return false; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="tagname"></param> |
| | | /// <returns></returns> |
| | | public override string GetMonitorNameByTag(string tagname) |
| | | { |
| | | if (monitoråºæ°´æ»ç®¡1åå.Item1 == tagname) |
| | |
| | | { |
| | | if (allRecords_hour == null || allRecords_hour.Count == 0) |
| | | { |
| | | error_info = "äºå·æ²åæ¡¥æ¹åæµç¹æ°æ®ä¸ºç©º"; |
| | | 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åºæ°´æ»ç®¡ç¬æ¶æµé.Item1); |
| | | //if (pipe1_flow == null) |
| | | //{ |
| | | // error_info = "äºå·æ²åæ¡¥æ¹å水管é1æµéæµç¹æªæ¾å°"; |
| | | // return null; |
| | | //} |
| | | var inlet_press1 = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´æ»ç®¡1åå.Item1); |
| | | if (inlet_press1 == null) |
| | | { |
| | | error_info = "忱忳µç«è¿æ°´æ»ç®¡1ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | var inlet_press2 = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´æ»ç®¡2åå.Item1); |
| | | if (inlet_press2 == null) |
| | | { |
| | | error_info = "忱忳µç«è¿æ°´æ»ç®¡2ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡åå.Item1); |
| | | //if (pipe1_press == null) |
| | | //{ |
| | | // error_info = "äºå·æ²åæ¡¥æ¹å水管é1ååæµç¹æªæ¾å°"; |
| | | // return null; |
| | | //} |
| | | |
| | | var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡1ç¬æ¶æµé.Item1); |
| | | if (pipe1_flow == null) |
| | | { |
| | | error_info = "忱忳µç«æ°´ç®¡é1æµéæµç¹æªæ¾å°"; |
| | | 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_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2ç¬æ¶æµé.Item1); |
| | | if (pipe2_flow == null) |
| | | { |
| | | error_info = "忱忳µç«æ°´ç®¡é2æµéæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | var pipe2_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2åå.Item1); |
| | | if (pipe2_press == null) |
| | | { |
| | | error_info = "忱忳µç«æ°´ç®¡é2ååæµç¹æªæ¾å°"; |
| | | 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.WaterLevelPara = new List<DispatchAna.Model.WaterLevelPara>() |
| | | complex_dispatch_request.InletPipePara = new List<DispatchAna.Model.InletPipePara>() |
| | | { |
| | | //new DispatchAna.Model.WaterLevelPara(){ Name="æ°´æ± ", Value = water_level.RecordValue} |
| | | new DispatchAna.Model.InletPipePara() |
| | | { |
| | | Name="è¿å£åå", |
| | | IsWaterLevel=false, |
| | | Value = (inlet_press1.RecordValue+inlet_press2.RecordValue)/2 |
| | | } |
| | | }; |
| | | 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, |
| | | IsWaterLevel = false, |
| | | TargetFlow = (pipe1_flow.RecordValue + pipe2_flow.RecordValue), |
| | | TargetPress = (pipe1_press.RecordValue + pipe2_press.RecordValue) / 2 |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | error_info = null; |
| | | return complex_dispatch_request; |