換點主流程更該

master
lxw 6 months ago
parent 57dd51bfae
commit 7069549e17

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

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

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

Loading…
Cancel
Save