diff --git a/Service/Execute/Step/CarPrepareState.cs b/Service/Execute/Step/CarPrepareState.cs index df0f0fd..bdc296f 100644 --- a/Service/Execute/Step/CarPrepareState.cs +++ b/Service/Execute/Step/CarPrepareState.cs @@ -51,7 +51,7 @@ public class CarPrepareState : IState //TBox连接 if (StaticStationInfo.TboxStateConnect) { - InvokeStatus tboxConnect = CheckTBoxConnectFlag(machine); + InvokeStatus tboxConnect = TboxConnect(machine); if (tboxConnect != InvokeStatus.Done) { return SwappingStateMachine.ReturnWithInvokeErr(tboxConnect, ExceptionReason.None); diff --git a/Service/Mgr/SwapOrderMgr.cs b/Service/Mgr/SwapOrderMgr.cs index bb70c0d..0950b01 100644 --- a/Service/Mgr/SwapOrderMgr.cs +++ b/Service/Mgr/SwapOrderMgr.cs @@ -35,7 +35,8 @@ public class SwapOrderMgr List batterys = _swapOrderBatteryRepository.QueryListByClause(i => - swapOrderSn.Contains(i.SwapOrderSn) && i.DownBatteryNo != null); + swapOrderSn.Contains(i.SwapOrderSn) && i.DownBatteryNo != null && i.DownBatteryNo!="-1" + && i.DownBatterySoc!=-1 && i.DownBatterySoc!=null); if (batterys.Count <= 0) { @@ -59,7 +60,12 @@ public class SwapOrderMgr continue; } - if (null == swapOrderBattery.DownBatteryNo) + + if (null == swapOrderBattery.DownBatteryNo || "-1".Equals(swapOrderBattery.DownBatteryNo)) + { + continue; + } + if (null == swapOrderBattery.DownBatterySoc || -1==swapOrderBattery.DownBatterySoc) { continue; } diff --git a/Service/MyTask/UpdateDownBatteryInfoTask.cs b/Service/MyTask/UpdateDownBatteryInfoTask.cs index 9afff4f..6067bef 100644 --- a/Service/MyTask/UpdateDownBatteryInfoTask.cs +++ b/Service/MyTask/UpdateDownBatteryInfoTask.cs @@ -39,7 +39,7 @@ public class UpdateDownBatteryInfoTask : ITask { List batterys = _swapOrderBatteryRepository.QueryListByClause( - i => i.DownBatteryNo == null && i.DownBatteryBinNo != null); + i => (i.DownBatteryNo == null || i.DownBatterySoc<0) && i.DownBatteryBinNo != null); if (batterys.Count <= 0)