换电订单task增加校验

master
tq 1 month ago
parent 017b5cb1ef
commit a7d39970f8

@ -60,7 +60,12 @@ public class UpdateDownBatteryInfoTask : ITask
{
//更新换下电池包
binInfosMap.TryGetValue(battery.DownBatteryBinNo.ToString(), out BinInfo info);
if (info==null)
{
continue;
}
if (info.BatteryNo == null || "".Equals(info.BatteryNo )|| "-1".Equals(info.BatteryNo))
{
continue;
@ -78,6 +83,8 @@ public class UpdateDownBatteryInfoTask : ITask
battery.DownBatteryNo = info.BatteryNo;
battery.DownBatterySoc = info.Soc;
battery.DownBatterySoe = info.Soe;
battery.DownNominalEnergy = info.NominalEnergy;
updateDbBattery.Add(battery);
}

Loading…
Cancel
Save