现场修正:防止重复发启动充电

master
CZ 5 months ago
parent af0822f8b5
commit 355ef6b8d7

@ -182,6 +182,9 @@ public class AutoChargeTask : ITask
{
float? chargePower = EquipInfoRepository.QueryPowerByCode(binInfo.ChargerNo);
float? power = chargePower == null ? StaticStationInfo.ChargePower : chargePower;
if (binInfo.ChargeStatus != 1)
{
//没有充电时候在充电
Result<bool>? result = ClientMgr.GetBySn(binInfo.ChargerNo)
?.StartCharge(chargeSoc, (float)power);
if (result is { IsSuccess: true })
@ -197,12 +200,12 @@ public class AutoChargeTask : ITask
}
}
}
}
#region 达到充电SOC自动停
foreach (var VARIABLE in chargingList)
{
if (StaticStationInfo.ChargeSoc != 100)
if (VARIABLE.Soc >= (StaticStationInfo.ChargeSoc + 1))
{
Log.Info($"auto stop charge {VARIABLE.No} soc>=chaegeSoc+1 soc:{VARIABLE.Soc}");

Loading…
Cancel
Save