From ed2a3a3ca8b792b20c787455f21cf4dcbeabaa87 Mon Sep 17 00:00:00 2001 From: lxw Date: Thu, 12 Sep 2024 17:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E7=94=B5=E6=B5=81=E7=A8=8B=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/Step/SwapDoneState.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Service/Execute/Step/SwapDoneState.cs b/Service/Execute/Step/SwapDoneState.cs index 924c5a1..df088f6 100644 --- a/Service/Execute/Step/SwapDoneState.cs +++ b/Service/Execute/Step/SwapDoneState.cs @@ -211,7 +211,7 @@ public class SwapDoneState : IState /// public InvokeStatus LockCar(SwappingStateMachine machine) { - int v = 0; + return Invoker.Invoke("LockCar", 500, 100, machine.IsCanceled, machine.IsManualSwapSucc, () => machine.VelLockFlag, () => { @@ -222,10 +222,9 @@ public class SwapDoneState : IState { //查询车辆锁止状态 Task carInfo = TBoxApi.GetCarInfo(machine.RfidReadModel.VelNo); - if (carInfo.Result?.CarStatus?.LockStatus == 2) + if (carInfo.Result?.CarStatus?.LockStatus == 2 || machine.ManualConfirmCarLockFlag) { - if (v == 0) - { + var SoundClient = AppInfo.Container.Resolve(); SoundClient.SoundPlay(SoundEnum.music77); Thread.Sleep(4000); @@ -233,11 +232,7 @@ public class SwapDoneState : IState Thread.Sleep(3000); _CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.VelLockFlag, machine); - _CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarOutFlag, - machine); - - v = 1; - } + machine.BoxCarInfoModel = carInfo.Result; SoundApi.PlayOneSound(machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success ? (int)InfoEnum.SwapInfo.InfoCarLeave @@ -253,7 +248,7 @@ public class SwapDoneState : IState //断连Tbox if (StaticStationInfo.TboxStateDisConnect) { - TBoxApi.DisConnect(machine.BoxCarInfoModel.CarNo); + TBoxApi.DisConnect(machine.BoxCarInfoModel?.CarNo); } //新增小步