diff --git a/Service/MyTask/UpdateDownBatteryInfoTask.cs b/Service/MyTask/UpdateDownBatteryInfoTask.cs index d80cf6a..23d9bf8 100644 --- a/Service/MyTask/UpdateDownBatteryInfoTask.cs +++ b/Service/MyTask/UpdateDownBatteryInfoTask.cs @@ -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); }