达到充电SOC后取消停止充电

zw
CZ 4 months ago
parent 9e11c8f58f
commit 2b469ccd40

@ -153,16 +153,7 @@ public class AutoChargeTask : ITask
List<BinInfo> chargingList = binInfos.Where(it => it.ChargeStatus == 1).ToList();
Log.Info(
$"chargingList={JsonConvert.SerializeObject(chargingList.Select(info => info.Code + "," + info.ChargerNo).ToList())}");
if (canSwapList.Count >= needBatteryCount)
{
Log.Info($"can swap count {canSwapList.Count} > {needBatteryCount}, all stop={JsonConvert.SerializeObject(chargingList.Select(info => info.Code + "," + info.ChargerNo).ToList())}");
foreach (var t in chargingList)
{
Log.Info($"auto stop charge {t.No}");
ClientMgr.GetBySn(t.ChargerNo)?.SendRemoteStopCharging();
}
}
else
if (canSwapList.Count <= needBatteryCount)
{
List<BinInfo> canChargeList = binInfos.Where(it =>
it.Soc != null && Convert.ToSingle(it.Soc) < StaticStationInfo.SwapSoc &&

Loading…
Cancel
Save