diff --git a/Service/Execute/Step/SwapDoneState.cs b/Service/Execute/Step/SwapDoneState.cs index b5afa14..20ab48c 100644 --- a/Service/Execute/Step/SwapDoneState.cs +++ b/Service/Execute/Step/SwapDoneState.cs @@ -43,13 +43,16 @@ public class SwapDoneState : IState _CommonMgr.UpdateAmtOrder(machine); } - //新增换电成功上报云平台数据 - _CommonMgr.InsertCloudReportForSwapSuccess(machine); - //换电成功关于bininfo表的更新 - _CommonMgr.UpdateBinInfoForSwapSuccess(machine); - - //可人工确认换电成功标识 - machine.PlcSwapFlag = true; + Task.Run(() => + { + //新增换电成功上报云平台数据 + _CommonMgr.InsertCloudReportForSwapSuccess(machine); + //换电成功关于bininfo表的更新 + _CommonMgr.UpdateBinInfoForSwapSuccess(machine); + + //可人工确认换电成功标识 + machine.PlcSwapFlag = true; + }); if (machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success) { @@ -87,7 +90,7 @@ public class SwapDoneState : IState /// public InvokeStatus LockCar(SwappingStateMachine machine) { - return Invoker.Invoke("LockCar", 500, 100, machine.IsCanceled,machine.IsManualSwapSucc, + return Invoker.Invoke("LockCar", 500, 100, machine.IsCanceled, machine.IsManualSwapSucc, () => machine.VelLockFlag, () => { Task result = TBoxApi.LockCarManyTimes(machine.RfidReadModel.VelVin); @@ -128,7 +131,7 @@ public class SwapDoneState : IState public InvokeStatus ExistRadar(SwappingStateMachine machine) { - return Invoker.Invoke("wait exist radar", 1000, 5, machine.IsCanceled,machine.IsManualSwapSucc, + return Invoker.Invoke("wait exist radar", 1000, 5, machine.IsCanceled, machine.IsManualSwapSucc, () => machine.RadarOutFlag, () => { if (PlcApi.ExitRadar()) diff --git a/Service/MyTask/SwapOrderReportCloudTask.cs b/Service/MyTask/SwapOrderReportCloudTask.cs index e34bb99..1921544 100644 --- a/Service/MyTask/SwapOrderReportCloudTask.cs +++ b/Service/MyTask/SwapOrderReportCloudTask.cs @@ -29,7 +29,7 @@ public class SwapOrderReportCloudTask : ITask public int Interval() { - return 1000 * 20; + return 1000 * 3; } public void Handle()