|
|
@ -25,7 +25,8 @@ public class CarPrepareState : IState
|
|
|
|
private readonly SwapOrderStepService _swapOrderStepService = AppInfo.Container.Resolve<SwapOrderStepService>();
|
|
|
|
private readonly SwapOrderStepService _swapOrderStepService = AppInfo.Container.Resolve<SwapOrderStepService>();
|
|
|
|
private readonly SwapAmtOrderRepository _amtOrderRepository = AppInfo.Container.Resolve<SwapAmtOrderRepository>();
|
|
|
|
private readonly SwapAmtOrderRepository _amtOrderRepository = AppInfo.Container.Resolve<SwapAmtOrderRepository>();
|
|
|
|
|
|
|
|
|
|
|
|
private readonly SwapOrderBatteryRepository _swapOrderBatteryRepository = AppInfo.Container.Resolve<SwapOrderBatteryRepository>();
|
|
|
|
private readonly SwapOrderBatteryRepository _swapOrderBatteryRepository =
|
|
|
|
|
|
|
|
AppInfo.Container.Resolve<SwapOrderBatteryRepository>();
|
|
|
|
|
|
|
|
|
|
|
|
public StateResult Handle(SwappingStateMachine machine)
|
|
|
|
public StateResult Handle(SwappingStateMachine machine)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -147,18 +148,19 @@ public class CarPrepareState : IState
|
|
|
|
if (BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
|
|
|
|
if (BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
|
|
|
|
int.Parse(StaticStationInfo.StationModel)) == StationConstant.StationModel.Remote)
|
|
|
|
int.Parse(StaticStationInfo.StationModel)) == StationConstant.StationModel.Remote)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool flag = CloudApi.VehicleCheck(machine.RfidReadModel);
|
|
|
|
int vehicleCheck = CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
|
|
|
|
|
|
|
|
|
|
|
|
if (!flag)
|
|
|
|
if (vehicleCheck != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_log.Info("cloud check vehicle error");
|
|
|
|
_log.Info("cloud check vehicle error");
|
|
|
|
|
|
|
|
machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
machine.ExceptionReason = ExceptionReason.None;
|
|
|
|
machine.ExceptionReason = ExceptionReason.None;
|
|
|
|
_log.Info("cloud check vehicle done");
|
|
|
|
_log.Info("cloud check vehicle done");
|
|
|
|
machine.CloudVelCheckFlag = true;
|
|
|
|
machine.CloudVelCheckFlag = true;
|
|
|
|
machine.LedTool.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
|
|
|
|
|
|
|
|
_swapOrderStepService.InsertSwapStepForSwapMain(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag,
|
|
|
|
_swapOrderStepService.InsertSwapStepForSwapMain(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag,
|
|
|
|
machine.StepSort++, machine.SwapOrder.Sn);
|
|
|
|
machine.StepSort++, machine.SwapOrder.Sn);
|
|
|
|