换电流程相关

master
lxw 2 months ago
parent 25f6e4515b
commit ed2a3a3ca8

@ -211,7 +211,7 @@ public class SwapDoneState : IState
/// <returns></returns>
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<TboxCarInfoModel> carInfo = TBoxApi.GetCarInfo(machine.RfidReadModel.VelNo);
if (carInfo.Result?.CarStatus?.LockStatus == 2)
{
if (v == 0)
if (carInfo.Result?.CarStatus?.LockStatus == 2 || machine.ManualConfirmCarLockFlag)
{
var SoundClient = AppInfo.Container.Resolve<SoundClient>();
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);
}
//新增小步

Loading…
Cancel
Save