|
|
|
@ -3,20 +3,44 @@ using Entity.DbModel.Station;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Service.Cloud.Client;
|
|
|
|
|
using Service.Cloud.Msg.Cloud.Req;
|
|
|
|
|
using Service.Cloud.Msg.Cloud.Resp;
|
|
|
|
|
using Service.Cloud.Msg.Host.Req;
|
|
|
|
|
using Service.Execute.Model;
|
|
|
|
|
|
|
|
|
|
namespace Service.Execute.Api;
|
|
|
|
|
|
|
|
|
|
public class CloudApi
|
|
|
|
|
{
|
|
|
|
|
private const int TimeSpan = 30;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 云平台车辆认证
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="rfidReadModel"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool VehicleCheck(RfidReadModel rfidReadModel)
|
|
|
|
|
public static int VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder)
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
VehicleCertification vehicleCertification = new()
|
|
|
|
|
{
|
|
|
|
|
ty = 1,
|
|
|
|
|
cn = rfidReadModel.VelNo,
|
|
|
|
|
vi = rfidReadModel.VelVin,
|
|
|
|
|
mac = rfidReadModel.VelMac,
|
|
|
|
|
en = 0,
|
|
|
|
|
dt = swapOrder.VehicleEnterTime,
|
|
|
|
|
mode = 0,
|
|
|
|
|
};
|
|
|
|
|
VehicleCertificationResp? sendVehicleCertification =
|
|
|
|
|
CloudClientMgr.CloudClient?.SendVehicleCertification(vehicleCertification,
|
|
|
|
|
global::System.TimeSpan.FromSeconds(TimeSpan));
|
|
|
|
|
|
|
|
|
|
if (sendVehicleCertification == null)
|
|
|
|
|
{
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return sendVehicleCertification.re;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -30,12 +54,11 @@ public class CloudApi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上报tbox数据
|
|
|
|
|
/// 上报车辆数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public static void UploadTBoxCarInfo(SwapOrder swapOrder, TboxCarInfoModel model)
|
|
|
|
|
{
|
|
|
|
|
return ;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -54,6 +77,6 @@ public class CloudApi
|
|
|
|
|
public static bool ClearCarCanStartInfo()
|
|
|
|
|
{
|
|
|
|
|
CloudClientMgr.CloudClient.CarCanStart = null;
|
|
|
|
|
return true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|