diff --git a/Common/lib/HybirdFrameworkCore.dll b/Common/lib/HybirdFrameworkCore.dll index ed80839..10adfda 100644 Binary files a/Common/lib/HybirdFrameworkCore.dll and b/Common/lib/HybirdFrameworkCore.dll differ diff --git a/Service/Charger/Handler/UploadTelemetryDataHandler.cs b/Service/Charger/Handler/UploadTelemetryDataHandler.cs index 69b7456..39f0f60 100644 --- a/Service/Charger/Handler/UploadTelemetryDataHandler.cs +++ b/Service/Charger/Handler/UploadTelemetryDataHandler.cs @@ -1,5 +1,6 @@ using DotNetty.Transport.Channels; using HybirdFrameworkCore.Autofac.Attribute; +using HybirdFrameworkCore.Configuration; using HybirdFrameworkCore.Redis; using log4net; using Newtonsoft.Json; @@ -17,7 +18,7 @@ namespace Service.Charger.Handler public class UploadTelemetryDataHandler : SimpleChannelInboundHandler, IBaseHandler { private static readonly ILog Log = LogManager.GetLogger(typeof(UploadTelemetryDataHandler)); - + public RedisHelper RedisHelper { get; set; } protected override void ChannelRead0(IChannelHandlerContext ctx, UploadTelemetryData msg) { @@ -26,8 +27,11 @@ namespace Service.Charger.Handler msg.ChargerNo = sn; Log.Info($"receive {msg} from {sn}"); - RedisHelper.PublishAsync("UploadTelemetryData", JsonConvert.SerializeObject(msg)); - + if (!AppSettingsConstVars.DisabledTask.Contains("UploadTelemetryData")) + { + RedisHelper.PublishAsync("UploadTelemetryData", JsonConvert.SerializeObject(msg)); + } + client.UploadTelemetryData = msg; //充电机实时充电功率 client.RealTimeChargePower = msg.HighVoltageAcquisitionCurrent * msg.HighVoltageAcquisitionVoltage; diff --git a/WebStarter/appsettings.prod.json b/WebStarter/appsettings.prod.json index a7d8718..3ac71ca 100644 --- a/WebStarter/appsettings.prod.json +++ b/WebStarter/appsettings.prod.json @@ -35,5 +35,8 @@ "Job": { "Enabled": false }, + "Task": { + "Disabled": "UploadTelemetryData" + }, "AllowedHosts": "*" }