From c5cafea20142064ac61f7dcc7ae9ad9253ee13b0 Mon Sep 17 00:00:00 2001 From: lxw Date: Tue, 11 Jun 2024 10:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E5=8F=96=E6=B6=88bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/Step/CancelState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Service/Execute/Step/CancelState.cs b/Service/Execute/Step/CancelState.cs index 04b389e..a8e8ff1 100644 --- a/Service/Execute/Step/CancelState.cs +++ b/Service/Execute/Step/CancelState.cs @@ -25,7 +25,7 @@ public class CancelState : IState { _log.Info($"'goto cancel"); machine.CancelFlag = false; - if (machine.SwapOrderBatteryInfo.swapAmtOrder != null) + if (machine.SwapOrderBatteryInfo!=null && machine.SwapOrderBatteryInfo.swapAmtOrder != null) { machine.SwapOrderBatteryInfo.swapAmtOrder.Status = (byte)InfoEnum.AmtOrderStatus.SwapFail; _swapAmtOrderRepository.Update(machine.SwapOrderBatteryInfo.swapAmtOrder);