From b814fd3e262f52365cf6c38d4e8d7230958c35e1 Mon Sep 17 00:00:00 2001 From: wangzelong <2692854983@qq.com> Date: 星期一, 24 十月 2022 20:43:59 +0800 Subject: [PATCH] 对接 --- Application/IStation.Application.OpenApi/shys/plan/shys/shys临江2号泵房.cs | 111 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys严桥泵站.cs | 2 Application/IStation.Application.OpenApi/shys/plan/shys/shys南汇北泵站.cs | 95 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys临江1号泵房.cs | 106 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys陈行二输.cs | 94 ++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys陈行一输.cs | 98 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys泰和泵站.cs | 94 ++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys金泽泵站.cs | 94 ++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys徐泾泵站.cs | 94 ++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys金海泵站.cs | 98 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/ShysHelper.cs | 13 Application/IStation.Application.OpenApi/shys/plan/shys/shys大桥泵站.cs | 96 +++++ Application/IStation.Application.OpenApi/shys/plan/shys/shys松江泵站.cs | 93 ++++ 13 files changed, 1,086 insertions(+), 2 deletions(-) diff --git a/Application/IStation.Application.OpenApi/shys/plan/shys/ShysHelper.cs b/Application/IStation.Application.OpenApi/shys/plan/shys/ShysHelper.cs index c366097..8e4f58a 100644 --- a/Application/IStation.Application.OpenApi/shys/plan/shys/ShysHelper.cs +++ b/Application/IStation.Application.OpenApi/shys/plan/shys/ShysHelper.cs @@ -37,7 +37,18 @@ _dict.Add(3, new StationInfo(9, new IStation.Calculation.shys浜斿彿娌熼噾娴锋柟鍚�()));//OK _dict.Add(4, new StationInfo(3, new IStation.Calculation.shys浜斿彿娌熶弗妗ユ柟鍚�1())); _dict.Add(5, new StationInfo(5, new IStation.Calculation.shys浜斿彿娌熶弗妗ユ柟鍚�2()));//OK - _dict.Add(6, new StationInfo(4, new IStation.Calculation.shys浜斿彿娌熶弗妗ユ柟鍚�2()));//OK + _dict.Add(6, new StationInfo(4, new IStation.Calculation.shys涓ユˉ娉电珯()));//OK + _dict.Add(7, new StationInfo(6, new IStation.Calculation.shys涓存睙1鍙锋车鎴�()));//OK + _dict.Add(8, new StationInfo(7, new IStation.Calculation.shys涓存睙2鍙锋车鎴�()));//OK + _dict.Add(9, new StationInfo(8, new IStation.Calculation.shys寰愭尘娉电珯()));//OK + _dict.Add(10, new StationInfo(10, new IStation.Calculation.shys閲戞捣娉电珯()));//OK + _dict.Add(11, new StationInfo(11, new IStation.Calculation.shys鍗楁眹鍖楁车绔�()));//OK + _dict.Add(12, new StationInfo(15, new IStation.Calculation.shys闄堣涓�杈�()));//OK + _dict.Add(13, new StationInfo(16, new IStation.Calculation.shys闄堣浜岃緭()));//OK + _dict.Add(14, new StationInfo(17, new IStation.Calculation.shys娉板拰娉电珯()));//OK + _dict.Add(15, new StationInfo(19, new IStation.Calculation.shys閲戞辰娉电珯()));//OK + _dict.Add(16, new StationInfo(20, new IStation.Calculation.shys鏉炬睙娉电珯()));//OK + _dict.Add(17, new StationInfo(21, new IStation.Calculation.shys澶фˉ娉电珯()));//OK //{ // {1,2},//闀垮叴娉电珯 diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\245\346\241\245\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\245\346\241\245\346\263\265\347\253\231.cs" index 3b1e472..ec33c19 100644 --- "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\245\346\241\245\346\263\265\347\253\231.cs" +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\245\346\241\245\346\263\265\347\253\231.cs" @@ -18,7 +18,7 @@ /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) /// </summary> private Tuple<string, long> monitor杩涙按璋冭妭姹犳恫浣� = new Tuple<string, long>("_0402010101089903001", 409); - + //private Tuple<string, long> monitor鍑烘按璋冭妭姹犳恫浣� = new Tuple<string, long>("_0402010101089903002", 409);Istion娌℃湁 diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2371\345\217\267\346\263\265\346\210\277.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2371\345\217\267\346\263\265\346\210\277.cs" new file mode 100644 index 0000000..797e441 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2371\345\217\267\346\263\265\346\210\277.cs" @@ -0,0 +1,106 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys涓存睙1鍙锋车鎴� : PlanAnaBaseCalculator + { + public shys涓存睙1鍙锋车鎴�() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + private Tuple<string, long> monitor杩涙按鍓嶆睜娑蹭綅 = new Tuple<string, long>("_0402010102089903003", 456); + private Tuple<string, long> monitor鍑烘按鍓嶆睜娑蹭綅 = new Tuple<string, long>("_0402010102089903002", 458); + + + + + /// <summary> + /// + /// </summary> + /// <param name="tagname"></param> + /// <returns></returns> + public override bool Is娑蹭綅Monitor(string tagname) + { + if (tagname == monitor杩涙按鍓嶆睜娑蹭綅.Item1) + return true; + else + return false; + } + + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2372\345\217\267\346\263\265\346\210\277.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2372\345\217\267\346\263\265\346\210\277.cs" new file mode 100644 index 0000000..db99e15 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\344\270\264\346\261\2372\345\217\267\346\263\265\346\210\277.cs" @@ -0,0 +1,111 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys涓存睙2鍙锋车鎴� : PlanAnaBaseCalculator + { + public shys涓存睙2鍙锋车鎴�() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤1鍘嬪姏 = new Tuple<string, long>("_0402010601040104001", 510); + + private Tuple<string, long> monitor鍑烘按鎬荤1鐬椂娴侀噺= new Tuple<string, long>("_0402010601040105001", 511); + private Tuple<string, long> monitor鍑烘按鎬荤2鍘嬪姏 = new Tuple<string, long>("_0402010601040204001", 513); + private Tuple<string, long> monitor鍑烘按鎬荤2鐬椂娴侀噺 = new Tuple<string, long>("_0402010601040205001", 514); + private Tuple<string, long> monitor鍑烘按鎬荤3鍘嬪姏 = new Tuple<string, long>("_0402010601040304001", 516); + private Tuple<string, long> monitor鍑烘按鎬荤3鐬椂娴侀噺 = new Tuple<string, long>("_0402010601040305001", 517); + + private Tuple<string, long> monitor璋冭妭姹犳恫浣� = new Tuple<string, long>("_0402010102089903001", 509); + /// <summary> + /// + /// </summary> + /// <param name="tagname"></param> + /// <returns></returns> + public override bool Is娑蹭綅Monitor(string tagname) + { + if (tagname == monitor璋冭妭姹犳恫浣�.Item1) + return true; + else + return false; + } + + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\215\227\346\261\207\345\214\227\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\215\227\346\261\207\345\214\227\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..e9f89fb --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\215\227\346\261\207\345\214\227\346\263\265\347\253\231.cs" @@ -0,0 +1,95 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys鍗楁眹鍖楁车绔� : PlanAnaBaseCalculator + { + public shys鍗楁眹鍖楁车绔�() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <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="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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\244\247\346\241\245\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\244\247\346\241\245\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..c58d674 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\244\247\346\241\245\346\263\265\347\253\231.cs" @@ -0,0 +1,96 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys澶фˉ娉电珯 : PlanAnaBaseCalculator + { + public shys澶фˉ娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤涓滆皟鍘嬫睜 = new Tuple<string, long>("_0402010301080103002", 1049); + private Tuple<string, long> monitor鍑烘按鎬荤瑗胯皟鍘嬫睜 = new Tuple<string, long>("_0402010301080103001", 1050); + private Tuple<string, long> monitor鍑烘按鎬荤鐬椂娴侀噺 = new Tuple<string, long>("_0402010301090103004", 1051); + private Tuple<string, long> monitor杩涙按浜曟牸鏍呭墠娑蹭綅1 = new Tuple<string, long>("_0402010301034103001", 1044); + private Tuple<string, long> monitor杩涙按浜曟牸鏍呭墠娑蹭綅2 = new Tuple<string, long>("_0402010301034203001", 1045); + private Tuple<string, long> monitor杩涙按浜曟牸鏍呭墠娑蹭綅3 = new Tuple<string, long>("_0402010301034303001", 1046); + private Tuple<string, long> monitor杩涙按浜曟牸鏍呭墠娑蹭綅4 = new Tuple<string, long>("_0402010301034403001", 1047); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\276\220\346\263\276\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\276\220\346\263\276\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..1d5d293 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\345\276\220\346\263\276\346\263\265\347\253\231.cs" @@ -0,0 +1,94 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys寰愭尘娉电珯 : PlanAnaBaseCalculator + { + public shys寰愭尘娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤鍘嬪姏 = new Tuple<string, long>("_0402010302080104002", 574); + + private Tuple<string, long> monitor鍑烘按鎬荤1鐬椂娴侀噺= new Tuple<string, long>("_0402010302080102002", 572); + private Tuple<string, long> monitor杩涙按鎬荤鍘嬪姏 = new Tuple<string, long>("_0402010302080104001", 571); + + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\235\276\346\261\237\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\235\276\346\261\237\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..be46cf0 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\235\276\346\261\237\346\263\265\347\253\231.cs" @@ -0,0 +1,93 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys鏉炬睙娉电珯 : PlanAnaBaseCalculator + { + public shys鏉炬睙娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤鍘嬪姏 = new Tuple<string, long>("_0402010791000000004", 1134); + private Tuple<string, long> monitor鍑烘按鎬荤鐬椂娴侀噺 = new Tuple<string, long>("_0402010791000000005", 1135); + private Tuple<string, long> monitor鍖椾晶鍓嶆睜娑蹭綅 = new Tuple<string, long>("_0402010791000000101", 1129); + private Tuple<string, long> monitor鍗椾晶鍓嶆睜娑蹭綅 = new Tuple<string, long>("_0402010791000000100", 1130); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\263\260\345\222\214\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\263\260\345\222\214\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..e127602 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\346\263\260\345\222\214\346\263\265\347\253\231.cs" @@ -0,0 +1,94 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys娉板拰娉电珯 : PlanAnaBaseCalculator + { + public shys娉板拰娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤1鍘嬪姏 = new Tuple<string, long>("_0402010602081304001", 989); + private Tuple<string, long> monitor鍑烘按鎬荤1鐬椂娴侀噺 = new Tuple<string, long>("_0402010602081302001", 990); + private Tuple<string, long> monitor鍑烘按鎬荤2鍘嬪姏 = new Tuple<string, long>("_0402010602081404001", 992); + private Tuple<string, long> monitor鍑烘按鎬荤2鐬椂娴侀噺 = new Tuple<string, long>("_0402010602081402001", 993); + private Tuple<string, long> monitor杩涙按杩涘彛鍘嬪姏 = new Tuple<string, long>("_0402010202010505001", 988); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\263\275\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\263\275\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..f973714 --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\263\275\346\263\265\347\253\231.cs" @@ -0,0 +1,94 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys閲戞辰娉电珯 : PlanAnaBaseCalculator + { + public shys閲戞辰娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤鍘嬪姏 = new Tuple<string, long>("_0402010701020104001", 1207); + private Tuple<string, long> monitor鍑烘按鎬荤鐬椂娴侀噺 = new Tuple<string, long>("_0402010701020103001", 1208); + private Tuple<string, long> monitor涓滃墠姹犳恫浣� = new Tuple<string, long>("_0402010701020106001", 1204); + private Tuple<string, long> monitor瑗垮墠姹犳恫浣� = new Tuple<string, long>("_0402010701020106003", 1205); + private Tuple<string, long> monitor涓墠姹犳恫浣� = new Tuple<string, long>("_0402010701020106002", 1206); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\265\267\346\263\265\347\253\231.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\265\267\346\263\265\347\253\231.cs" new file mode 100644 index 0000000..5705e8d --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\207\221\346\265\267\346\263\265\347\253\231.cs" @@ -0,0 +1,98 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys閲戞捣娉电珯 : PlanAnaBaseCalculator + { + public shys閲戞捣娉电珯() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鍗楁眹1鍘嬪姏 = new Tuple<string, long>("_0402010502090105011", 615); + private Tuple<string, long> monitor鍑烘按鍗楁眹1鐬椂娴侀噺 = new Tuple<string, long>("_0402010502090103013", 616); + private Tuple<string, long> monitor鍑烘按鍗楁眹2鍘嬪姏 = new Tuple<string, long>("_0402010502090105012", 618); + private Tuple<string, long> monitor鍑烘按鍗楁眹2鐬椂娴侀噺 = new Tuple<string, long>("_0402010502090103014", 619); + //private Tuple<string, long> monitor鍑烘按宸濇矙鎬荤杩涙按鍘嬪姏 = new Tuple<string, long>("_0402010502090105013", 613); + private Tuple<string, long> monitor鍑烘按宸濇矙鎬荤鍘嬪姏 = new Tuple<string, long>("_0402010502090105013", 621); + private Tuple<string, long> monitor鍑烘按宸濇矙鐬椂娴侀噺 = new Tuple<string, long>("_0402010502090103015", 622); + private Tuple<string, long> monitor杩涙按鎬荤鍘嬪姏1 = new Tuple<string, long>("_0402010502090105001", 611); + private Tuple<string, long> monitor杩涙按鎬荤鍘嬪姏2 = new Tuple<string, long>("_0402010502090205001", 613); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\270\200\350\276\223.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\270\200\350\276\223.cs" new file mode 100644 index 0000000..95f688f --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\270\200\350\276\223.cs" @@ -0,0 +1,98 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys闄堣涓�杈� : PlanAnaBaseCalculator + { + public shys闄堣涓�杈�() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤1鍘嬪姏 = new Tuple<string, long>("_0402010201090105001", 859); + private Tuple<string, long> monitor鍑烘按鎬荤1鐬椂娴侀噺 = new Tuple<string, long>("_0402060601010103000", 860); + private Tuple<string, long> monitor鍑烘按鎬荤2鍘嬪姏 = new Tuple<string, long>("_0402010201090105002", 862); + private Tuple<string, long> monitor鍑烘按鎬荤2鐬椂娴侀噺 = new Tuple<string, long>("_0402060601010203000", 863); + private Tuple<string, long> monitor鍑烘按鎬荤3鍘嬪姏 = new Tuple<string, long>("_0402060601010305000", 865); + private Tuple<string, long> monitor鍑烘按鎬荤3鐬椂娴侀噺 = new Tuple<string, long>("_0402010503030202003", 866); + private Tuple<string, long> monitor杩涙按鍓嶆睜娑蹭綅1 = new Tuple<string, long>("_0402010201090104011", 856); + private Tuple<string, long> monitor杩涙按鍓嶆睜娑蹭綅2 = new Tuple<string, long>("_0402010201091104123", 857); + private Tuple<string, long> monitor杩涙按鍓嶆睜娑蹭綅3 = new Tuple<string, long>("_0402010201091104122", 858); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} diff --git "a/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\272\214\350\276\223.cs" "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\272\214\350\276\223.cs" new file mode 100644 index 0000000..931e44d --- /dev/null +++ "b/Application/IStation.Application.OpenApi/shys/plan/shys/shys\351\231\210\350\241\214\344\272\214\350\276\223.cs" @@ -0,0 +1,94 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Calculation +{ + internal class shys闄堣浜岃緭 : PlanAnaBaseCalculator + { + public shys闄堣浜岃緭() + { + this._corpID = 4; + this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); + } + + /// <summary> + /// 娴嬬偣瀛楀吀(杩欎釜姣忎釜娉电珯閮戒笉涓�鏍�) + /// </summary> + + + private Tuple<string, long> monitor鍑烘按鎬荤1鍘嬪姏 = new Tuple<string, long>("_0402010201090105004", 917); + private Tuple<string, long> monitor鍑烘按鎬荤1鐬椂娴侀噺 = new Tuple<string, long>("_0402010201090103020", 918); + private Tuple<string, long> monitor鍑烘按鎬荤2鍘嬪姏 = new Tuple<string, long>("_0402010201090105003", 920); + private Tuple<string, long> monitor鍑烘按鎬荤2鐬椂娴侀噺 = new Tuple<string, long>("_0402010201090103017", 921); + private Tuple<string, long> monitor杩涙按鍓嶆睜娑蹭綅 = new Tuple<string, long>("_0402010201080204002", 916); + /// <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鍑烘按鎬荤鐬椂娴侀噺.Item1); + //if (pipe1_flow == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1娴侀噺娴嬬偣鏈壘鍒�"; + // return null; + //} + + //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitor鍑烘按鎬荤鍘嬪姏.Item1); + //if (pipe1_press == null) + //{ + // error_info = "浜斿彿娌熷噷妗ユ柟鍚戞按绠¢亾1鍘嬪姏娴嬬偣鏈壘鍒�"; + // 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>() + { + //new DispatchAna.Model.WaterLevelPara(){ 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; + } + + + } +} -- Gitblit v1.9.3