diff --git a/Service/Charger/Client/ChargerClient.cs b/Service/Charger/Client/ChargerClient.cs index 67494a7..08b6849 100644 --- a/Service/Charger/Client/ChargerClient.cs +++ b/Service/Charger/Client/ChargerClient.cs @@ -172,7 +172,23 @@ public class ChargerClient : TcpClient /// /// 充电桩状态信息 /// - public ConcurrentDictionary ChargerPile = new(); + public ConcurrentDictionary ChargerPile = new() + { + [1]=new ChargerPile(), + [2]=new ChargerPile(), + [3]=new ChargerPile(), + [4]=new ChargerPile(), + [5]=new ChargerPile(), + [6]=new ChargerPile(), + [7]=new ChargerPile(), + [8]=new ChargerPile(), + [9]=new ChargerPile(), + [10]=new ChargerPile(), + [11]=new ChargerPile(), + [12]=new ChargerPile(), + [13]=new ChargerPile(), + [14]=new ChargerPile(), + }; /// /// 充电桩功率 diff --git a/Service/Charger/Common/ChargerUtils.cs b/Service/Charger/Common/ChargerUtils.cs index ab3e2aa..655b6dd 100644 --- a/Service/Charger/Common/ChargerUtils.cs +++ b/Service/Charger/Common/ChargerUtils.cs @@ -99,7 +99,7 @@ public static class ChargerUtils { // 除2,向上取整,拿到本地充电机code int ceilResult = (int)Math.Ceiling(parsedNumber / 2.0); - return ceilResult.ToString(); + return "C200" + ceilResult.ToString(); } else { diff --git a/Service/Charger/Handler/OutCharger/PileUploadRemoteSignalHandler.cs b/Service/Charger/Handler/OutCharger/PileUploadRemoteSignalHandler.cs index f7a678b..bebc10a 100644 --- a/Service/Charger/Handler/OutCharger/PileUploadRemoteSignalHandler.cs +++ b/Service/Charger/Handler/OutCharger/PileUploadRemoteSignalHandler.cs @@ -1,4 +1,5 @@ using DotNetty.Transport.Channels; +using HybirdFrameworkCore.Autofac.Attribute; using log4net; using Service.Charger.Client; using Service.Charger.Handler; @@ -8,6 +9,8 @@ namespace Service.Charger.Handler.OutCharger; /// /// 3.7.11 充电桩遥信数据上报 /// +[Order(8)] +[Scope("InstancePerDependency")] public class PileUploadRemoteSignalHandler: SimpleChannelInboundHandler, IBaseHandler { private static readonly ILog Log = LogManager.GetLogger(typeof(PileUploadRemoteSignalHandler));