diff --git a/Service/Execute/Mgr/CommonMgr.cs b/Service/Execute/Mgr/CommonMgr.cs index 92953a8..1b54955 100644 --- a/Service/Execute/Mgr/CommonMgr.cs +++ b/Service/Execute/Mgr/CommonMgr.cs @@ -396,14 +396,30 @@ public class CommonMgr //修改入仓顺序 BinInfo binInfo = _binInfoRepository .QueryListByClause(i => i.BatteryEnterSeq != null, "battery_enter_seq desc").First(); + + inBinInfo.BatteryEnterSeq = binInfo.BatteryEnterSeq + 1; inBinInfo.InTime = DateTime.Now; - _binInfoRepository.Update(inBinInfo); + _binInfoRepository.Update( + i => new BinInfo() + { + BatteryEnterSeq = inBinInfo.BatteryEnterSeq, + InTime=inBinInfo.InTime + }, + it => it.Id == inBinInfo.Id); var upBinInfo = machineSwapOrderBatteryInfo.UpBinInfo; upBinInfo.Soc = -1; upBinInfo.Soe = -1; upBinInfo.BatteryNo = "-1"; - _binInfoRepository.Update(upBinInfo); + _binInfoRepository.Update( + i => new BinInfo() + { + Soc = -1, + Soe= -1, + BatteryNo="-1" + }, + it => it.Id == upBinInfo.Id); + } }