充电机主动上送充电记录加日志

zw
xjl 5 months ago
parent b9638e2f06
commit 53c49e0f39

@ -41,6 +41,7 @@ namespace Service.Charger.Handler
if(ClientMgr.TryGetClient(ctx.Channel, out var sn, out var client))
{
float[] powersPeriods = new float[4] { 0, 0, 0, 0 }; //元素索引顺序代表值1234
if (msg.FlagOfTime1 >= 1 && msg.FlagOfTime1 <= 4){powersPeriods[msg.FlagOfTime1 - 1] += msg.ChargingPowerOfTime1;}
if (msg.FlagOfTime2 >= 1 && msg.FlagOfTime2 <= 4){powersPeriods[msg.FlagOfTime2 - 1] += msg.ChargingPowerOfTime2;}
@ -128,6 +129,8 @@ namespace Service.Charger.Handler
}
ctx.Channel.WriteAndFlushAsync(new RecordChargeRespData());
Log.Info($"receive {msg} from {sn}");
}
}

Loading…
Cancel
Save