|
|
@ -86,7 +86,7 @@ public class CarPrepareState : IState
|
|
|
|
|
|
|
|
|
|
|
|
return new StateResult()
|
|
|
|
return new StateResult()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SwappingState = SwappingState.SwapCanStart
|
|
|
|
SwappingState = SwappingState.CarCtrl
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -143,25 +143,34 @@ public class CarPrepareState : IState
|
|
|
|
return Invoker.Invoke("cloud check vehicle", 500, 20, machine.IsCanceled,
|
|
|
|
return Invoker.Invoke("cloud check vehicle", 500, 20, machine.IsCanceled,
|
|
|
|
() => machine.CloudVelCheckFlag, () =>
|
|
|
|
() => machine.CloudVelCheckFlag, () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int vehicleCheck = -1;
|
|
|
|
if (StationConstant.StationModel.Remote ==
|
|
|
|
vehicleCheck= CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
|
|
|
|
BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
|
|
|
|
|
|
|
|
StaticStationInfo.StationModel))
|
|
|
|
if (vehicleCheck != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_log.Info("cloud check vehicle error");
|
|
|
|
int vehicleCheck = -1;
|
|
|
|
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
vehicleCheck = CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (vehicleCheck != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_log.Info("cloud check vehicle error");
|
|
|
|
|
|
|
|
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine.ExceptionReason = ExceptionReason.None;
|
|
|
|
|
|
|
|
_log.Info("cloud check vehicle done");
|
|
|
|
|
|
|
|
machine.CloudVelCheckFlag = true;
|
|
|
|
|
|
|
|
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO::
|
|
|
|
|
|
|
|
// machine.SwapOrder.CloudSn=
|
|
|
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag,
|
|
|
|
|
|
|
|
machine);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
machine.ExceptionReason = ExceptionReason.None;
|
|
|
|
|
|
|
|
_log.Info("cloud check vehicle done");
|
|
|
|
|
|
|
|
machine.CloudVelCheckFlag = true;
|
|
|
|
machine.CloudVelCheckFlag = true;
|
|
|
|
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO::
|
|
|
|
|
|
|
|
// machine.SwapOrder.CloudSn=
|
|
|
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag,
|
|
|
|
|
|
|
|
machine);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, () =>
|
|
|
|
}, () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|