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); } //新增小步