本地远程换电 判断修改

zw
lxw 6 months ago
parent 83751b84ce
commit a95b50fc38

@ -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);
}
}, () =>
{

@ -1,8 +1,10 @@
using Entity.Constant;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.AutoTask;
using log4net;
using Repository.Station;
using Service.Init;
using Service.Mgr;
namespace Service.MyTask;
@ -34,9 +36,17 @@ public class SwapOrderReportCloudTask : ITask
{
try
{
List<SwapOrderReportCloud> list = ReportCloudRepository.QueryListByClause(i => i.CloudReportStatus == 0);
if (StationConstant.StationModel.Local ==
BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
StaticStationInfo.StationModel))
{
return;
}
SwapOrderMgr.UploadCloud(list,1);
List<SwapOrderReportCloud>
list = ReportCloudRepository.QueryListByClause(i => i.CloudReportStatus == 0);
SwapOrderMgr.UploadCloud(list, 1);
}
catch (Exception e)
{

Loading…
Cancel
Save