換點主流程更該

master
lxw 6 months ago
parent 57dd51bfae
commit 7069549e17

@ -22,7 +22,7 @@ public abstract class CloudApi
/// </summary> /// </summary>
/// <param name="rfidReadModel"></param> /// <param name="rfidReadModel"></param>
/// <returns></returns> /// <returns></returns>
public static int VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder) public static VehicleCertificationResp? VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder)
{ {
VehicleCertification vehicleCertification = new() VehicleCertification vehicleCertification = new()
@ -45,12 +45,9 @@ public abstract class CloudApi
Log.Info( Log.Info(
$" CloudApi VehicleCheck SendVehicleCertification resp={JsonConvert.SerializeObject(sendVehicleCertification)}"); $" CloudApi VehicleCheck SendVehicleCertification resp={JsonConvert.SerializeObject(sendVehicleCertification)}");
if (sendVehicleCertification == null)
{
return -1;
}
return sendVehicleCertification.re; return sendVehicleCertification;
} }
/// <summary> /// <summary>

@ -49,6 +49,8 @@ public class CommonMgr
{ {
swapOrder.SwapWay = (int)StationConstant.StationWay.Auto; swapOrder.SwapWay = (int)StationConstant.StationWay.Auto;
swapOrder.CloudReportStatus = 0; swapOrder.CloudReportStatus = 0;
swapOrder.SwapWay = 1;
swapOrder.CreatedTime=DateTime.Now;
_swapOrderRepository.Insert(swapOrder); _swapOrderRepository.Insert(swapOrder);
return swapOrder; return swapOrder;
} }

@ -7,6 +7,7 @@ using Entity.Dto;
using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Autofac;
using log4net; using log4net;
using Repository.Station; using Repository.Station;
using Service.Cloud.Msg.Cloud.Resp;
using Service.Execute.Api; using Service.Execute.Api;
using Service.Execute.Model; using Service.Execute.Model;
using Service.Execute.StaticTools; using Service.Execute.StaticTools;
@ -147,10 +148,9 @@ public class CarPrepareState : IState
BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>( BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
StaticStationInfo.StationModel)) StaticStationInfo.StationModel))
{ {
int vehicleCheck = -1; VehicleCertificationResp? vehicleCertificationResp = CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
vehicleCheck = CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
if (vehicleCheck != 0) if (vehicleCertificationResp==null || vehicleCertificationResp.re!=0)
{ {
_log.Info("cloud check vehicle error"); _log.Info("cloud check vehicle error");
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成"); // machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
@ -162,8 +162,7 @@ public class CarPrepareState : IState
machine.CloudVelCheckFlag = true; machine.CloudVelCheckFlag = true;
// machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成"); // machine.LedTool?.WriteProgramContent("换电准备中:云平台车辆验证完成");
//TODO:: machine.SwapOrder.CloudSn = vehicleCertificationResp.on;
// machine.SwapOrder.CloudSn=
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag, _CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.CloudVelCheckFlag,
machine); machine);
} }

Loading…
Cancel
Save