From 206f751e840d22d83ee3fcf2d39b4e768b807294 Mon Sep 17 00:00:00 2001 From: lxw Date: Fri, 18 Oct 2024 15:35:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E7=94=B5=E7=BB=93=E6=9D=9F=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0bininof=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/Mgr/CommonMgr.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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); + } }