|
|
|
@ -86,7 +86,7 @@ public class CarPrepareState : IState
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
() => machine.CloudVelCheckFlag, () =>
|
|
|
|
|
{
|
|
|
|
|
int vehicleCheck = -1;
|
|
|
|
|
vehicleCheck= CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
|
|
|
|
|
|
|
|
|
|
if (vehicleCheck != 0)
|
|
|
|
|
if (StationConstant.StationModel.Remote ==
|
|
|
|
|
BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
|
|
|
|
|
StaticStationInfo.StationModel))
|
|
|
|
|
{
|
|
|
|
|
_log.Info("cloud check vehicle error");
|
|
|
|
|
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
|
|
|
|
|
int vehicleCheck = -1;
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}, () =>
|
|
|
|
|
{
|
|
|
|
|