diff --git a/Service/Execute/Api/CloudApi.cs b/Service/Execute/Api/CloudApi.cs
index 6379679..09111d0 100644
--- a/Service/Execute/Api/CloudApi.cs
+++ b/Service/Execute/Api/CloudApi.cs
@@ -22,7 +22,7 @@ public abstract class CloudApi
///
///
///
- 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;
}
///
diff --git a/Service/Execute/Mgr/CommonMgr.cs b/Service/Execute/Mgr/CommonMgr.cs
index 139d8e5..5a95fa2 100644
--- a/Service/Execute/Mgr/CommonMgr.cs
+++ b/Service/Execute/Mgr/CommonMgr.cs
@@ -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;
}
diff --git a/Service/Execute/Step/CarPrepareState.cs b/Service/Execute/Step/CarPrepareState.cs
index 56ec08a..9b00f0c 100644
--- a/Service/Execute/Step/CarPrepareState.cs
+++ b/Service/Execute/Step/CarPrepareState.cs
@@ -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(
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);
}