云平台msg命名,发送和对应比对修改

master
CZ 5 months ago
parent 4040e07857
commit 406e3c0c3e

@ -17,6 +17,7 @@ using MQTTnet.Formatter;
using MQTTnet.Protocol; using MQTTnet.Protocol;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Utilities;
using Repository.Station; using Repository.Station;
using Service.Cloud.Handler; using Service.Cloud.Handler;
using Service.Cloud.Msg; using Service.Cloud.Msg;
@ -25,6 +26,7 @@ using Service.Cloud.Msg.Cloud.Resp;
using Service.Cloud.Msg.Cloud.Resp.OutCharger; using Service.Cloud.Msg.Cloud.Resp.OutCharger;
using Service.Cloud.Msg.Host.Req; using Service.Cloud.Msg.Host.Req;
using Service.Cloud.Msg.Host.Req.OutCharger; using Service.Cloud.Msg.Host.Req.OutCharger;
using Service.Cloud.Msg.Host.Resp;
namespace Service.Cloud.Client; namespace Service.Cloud.Client;
@ -73,29 +75,57 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
public CarCanStart? CarCanStart { get; set; } public CarCanStart? CarCanStart { get; set; }
/// <summary> /// <summary>
/// /// 站端发-云端收
/// </summary> /// </summary>
public MsgPair<VehicleCertification, VehicleCertificationResp> CarAuth { get; set; } = new(); public MsgPair<CarAuth, CarAuthRes> CarAuth { get; set; } = new();
public MsgPair<CardataReport, CardataReportRes> VehicleData { get; set; } = new();
public MsgPair<SignIn, SignInRes> Sign { get; set; } = new();
public MsgPair<DevList, DevListRes> ReportingDevice { get; set; } = new();
public MsgPair<StaSwapRecord, StaSwapRecordRes> UploadPowerChange { get; set; } = new();
public MsgPair<ChargeRecordReport, ChargeRecordReportRes> ChargeRecord { get; set; } = new();
public MsgPair<StationRunStatus, StationRunStatusRes> HostStatus { get; set; } = new();
public MsgPair<StationChnRunStatus, StationChnRunStatusRes> ChannelStatus { get; set; } = new();
public MsgPair<FaultReport, FaultReportRes> RealTimeFault { get; set; } = new();
public MsgPair<EvmDataInfo, EvmDataInfoRes> TemperatureHumidity { get; set; } = new();
public MsgPair<AcDataInfo, AcDataInfoRes> AirConditioning { get; set; } = new();
public MsgPair<EqmStateStartLogInfo, EqmStateStartLogInfoRes> StartLog { get; set; } = new();
public MsgPair<EqmStateEndLogInfo, EqmStateEndLogInfoRes> EndLog { get; set; } = new();
public MsgPair<ChargeDevDataInfo, ChargeDevDataInfoRes> ChargeDevDataInfo { get; set; } = new();
public MsgPair<BatDataInfo, BatDataInfoRes> BatData { get; set; } = new(); public MsgPair<BatDataInfo, BatDataInfoRes> BatData { get; set; } = new();
public MsgPair<ChannelStatusReporting, ChannelStatusReportingResp> ChannelStatus { get; set; } = new();
public MsgPair<AirConditioningData, AirConditioningDataResp> AirConditioning { get; set; } = new();
public MsgPair<ChargeRecordReporting, ChargeRecordReportingResp> ChargeRecord { get; set; } = new();
public MsgPair<EndLogMessage, EndLogMessageResp> EndLog { get; set; } = new();
public MsgPair<HostStatusReported, HostStatusReportedResp> HostStatus { get; set; } = new();
public MsgPair<RealTimeFaultInfo, RealTimeFaultInfoResp> RealTimeFault { get; set; } = new();
public MsgPair<ReportingDeviceList, ReportingDeviceListResp> ReportingDevice { get; set; } = new();
public MsgPair<SignIn, SignInResp> Sign { get; set; } = new();
public MsgPair<StartLogMessage, StartLogMessageResp> StartLog { get; set; } = new();
public MsgPair<TemperatureHumidityData, TemperatureHumidityDataResp> TemperatureHumidity { get; set; } = new();
public MsgPair<UploadSwapOrder, UploadSwapOrderResp> UploadPowerChange { get; set; } = new();
public MsgPair<VehicleDataReporting, VehicleDataReportingResp> VehicleData { get; set; } = new();
public MsgPair<ChargeRecordUpLoad, ChargeRecordUploadRes> ChargeRecordUpLoad { get; set; } = new(); public MsgPair<ChargeRecordUpLoad, ChargeRecordUploadRes> ChargeRecordUpLoad { get; set; } = new();
public MsgPair<ChargeDevDataInfo, ChargeDevDataInfoRes> ChargeDevDataInfo { get; set; } = new(); public MsgPair<BatteryTotal, BatteryTotalRes> BatteryTotal { get; set; } = new();
public MsgPair<ChargingTotalDis, ChargingTotalDisRes> ChargingTotalDis { get; set; } = new();
public MsgPair<PowerTotal, PowerTotalRes> PowerTotal { get; set; } = new();
public MsgPair<StaChargingTotal, StaChargingTotalRes> StaChargingTotal { get; set; } = new();
public MsgPair<MeterEnergyKwh, MeterEnergyKwhRes> MeterEnergyKwh { get; set; } = new();
public MsgPair<MeterDayEnergyVal, MeterDayEnergyValRes> MeterDayEnergyVal { get; set; } = new();
public MsgPair<StaHourEnergyVal, StaHourEnergyValRes> StaHourEnergyVal { get; set; } = new();
public MsgPair<StaDayEnergyVal, StaDayEnergyValRes> StaDayEnergyVal { get; set; } = new();
public MsgPair<StaDayOpeEnergyVal, StaDayOpeEnergyValRes> StaDayOpeEnergyVal { get; set; } = new();
public MsgPair<StaHourAmountVal, StaHourAmountValRes> StaHourAmountVal { get; set; } = new();
/// <summary>
/// 云端发-站端收
/// </summary>
public MsgPair<CarCanStart, CarCanStartRes> CarCanStartInfo { get; set; } = new();
public MsgPair<SetStBaseInfo, SetStBaseInfoRes> SetStBaseInfo { get; set; } = new();
public MsgPair<SetService, SetServiceRes> SetService { get; set; } = new();
public MsgPair<SetOpTime, SetOpTimeRes> SetOpTime { get; set; } = new();
public MsgPair<SetOpModel, SetOpModelRes> SetOpModel { get; set; } = new();
public MsgPair<SetStaPrice, SetStaPriceRes> SetStaPrice { get; set; } = new();
public MsgPair<SetChargePrice, SetChargePriceRes> SetChargePrice { get; set; } = new();
public MsgPair<SetChangeCarData, SetChangeCarDataRes> SetChangeCarData { get; set; } = new();
public MsgPair<SetConfig, SetConfigRes> SetConfig { get; set; } = new();
public MsgPair<GetConfig, GetConfigRes> GetConfig { get; set; } = new();
//站外
public MsgPair<PileEndCharge, PileEndChargeResp> PileEndCharge { get; set; } = new(); public MsgPair<PileEndCharge, PileEndChargeResp> PileEndCharge { get; set; } = new();
public MsgPair<PileChargeRealtime, PileChargeRealtimeResp> PileChargeRealtime { get; set; } = new(); public MsgPair<PileChargeRealtime, PileChargeRealtimeResp> PileChargeRealtime { get; set; } = new();
public MsgPair<PileRealtime, PileRealtimeResp> PileRealtime { get; set; } = new(); public MsgPair<PileRealtime, PileRealtimeResp> PileRealtime { get; set; } = new();
#endregion #endregion
@ -396,12 +426,12 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
#region 主动发送CMD #region 主动发送CMD
public VehicleCertificationResp? SendVehicleCertification(VehicleCertification vehicleCertification, public CarAuthRes? SendVehicleCertification(CarAuth carAuth,
TimeSpan? timeSpan = null) TimeSpan? timeSpan = null)
{ {
Log.Info(vehicleCertification); Log.Info(carAuth);
this.CarAuth.Req = vehicleCertification; this.CarAuth.Req = carAuth;
this.Publish(vehicleCertification); this.Publish(carAuth);
return CarAuth.GetResp(timeSpan); return CarAuth.GetResp(timeSpan);
} }
@ -416,96 +446,96 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
/// <summary> /// <summary>
/// 换电站通道状态上报 /// 换电站通道状态上报
/// </summary> /// </summary>
/// <param name="channelStatusReporting"></param> /// <param name="stationChnRunStatus"></param>
/// <param name="timeSpan"></param> /// <param name="timeSpan"></param>
/// <returns></returns> /// <returns></returns>
public ChannelStatusReportingResp? SendChannelStatusReporting(ChannelStatusReporting channelStatusReporting, public StationChnRunStatusRes? SendChannelStatusReporting(StationChnRunStatus stationChnRunStatus,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.ChannelStatus.Req = channelStatusReporting; this.ChannelStatus.Req = stationChnRunStatus;
this.Publish(channelStatusReporting); this.Publish(stationChnRunStatus);
return ChannelStatus.GetResp(timeSpan); return ChannelStatus.GetResp(timeSpan);
} }
public AirConditioningDataResp? SendAirConditioningData(AirConditioningData airConditioningData, public AcDataInfoRes? SendAirConditioningData(AcDataInfo acDataInfo,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.AirConditioning.Req = airConditioningData; this.AirConditioning.Req = acDataInfo;
this.Publish(airConditioningData); this.Publish(acDataInfo);
return AirConditioning.GetResp(timeSpan); return AirConditioning.GetResp(timeSpan);
} }
public ChargeRecordReportingResp? SendChargeRecordReporting(ChargeRecordReporting chargeRecord, public ChargeRecordReportRes? SendChargeRecordReporting(ChargeRecordReport chargeRecord,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.ChargeRecord.Req = chargeRecord; this.ChargeRecord.Req = chargeRecord;
this.Publish(chargeRecord); this.Publish(chargeRecord);
return ChargeRecord.GetResp(timeSpan); return ChargeRecord.GetResp(timeSpan);
} }
public EndLogMessageResp? SendEndLogMessage(EndLogMessage endLogMessage, public EqmStateEndLogInfoRes? SendEndLogMessage(EqmStateEndLogInfo endLogMessage,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.EndLog.Req = endLogMessage; this.EndLog.Req = endLogMessage;
this.Publish(endLogMessage); this.Publish(endLogMessage);
return EndLog.GetResp(timeSpan); return EndLog.GetResp(timeSpan);
} }
public HostStatusReportedResp? SendHostStatusReported(HostStatusReported hostStatusReported, public StationRunStatusRes? SendHostStatusReported(StationRunStatus hostStatusReported,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.HostStatus.Req = hostStatusReported; this.HostStatus.Req = hostStatusReported;
this.Publish(hostStatusReported); this.Publish(hostStatusReported);
return HostStatus.GetResp(timeSpan); return HostStatus.GetResp(timeSpan);
} }
public RealTimeFaultInfoResp? SendRealTimeFaultInfo(RealTimeFaultInfo realTimeFaultInfo, public FaultReportRes? SendRealTimeFaultInfo(FaultReport faultReport,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.RealTimeFault.Req = realTimeFaultInfo; this.RealTimeFault.Req = faultReport;
this.Publish(realTimeFaultInfo); this.Publish(faultReport);
return RealTimeFault.GetResp(timeSpan); return RealTimeFault.GetResp(timeSpan);
} }
public ReportingDeviceListResp? SendReportingDeviceList(ReportingDeviceList reportingDeviceList, public DevListRes? SendReportingDeviceList(DevList devList,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.ReportingDevice.Req = reportingDeviceList; this.ReportingDevice.Req = devList;
this.Publish(reportingDeviceList); this.Publish(devList);
return ReportingDevice.GetResp(timeSpan); return ReportingDevice.GetResp(timeSpan);
} }
public SignInResp? SendSignIn(SignIn signIn, public SignInRes? SendSignIn(SignIn signIn,
TimeSpan? timeSpan=null) TimeSpan? timeSpan=null)
{ {
this.Sign.Req = signIn; this.Sign.Req = signIn;
this.Publish(signIn); this.Publish(signIn);
return Sign.GetResp(timeSpan); return Sign.GetResp(timeSpan);
} }
public StartLogMessageResp? SendStartLogMessage(StartLogMessage startLogMessage, public EqmStateStartLogInfoRes? SendStartLogMessage(EqmStateStartLogInfo eqmStateStartLogInfo,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.StartLog.Req = startLogMessage; this.StartLog.Req = eqmStateStartLogInfo;
this.Publish(startLogMessage); this.Publish(eqmStateStartLogInfo);
return StartLog.GetResp(timeSpan); return StartLog.GetResp(timeSpan);
} }
public TemperatureHumidityDataResp? SendTemperatureHumidityData(TemperatureHumidityData temperatureHumidityData, public EvmDataInfoRes? SendTemperatureHumidityData(EvmDataInfo evmDataInfo,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.TemperatureHumidity.Req = temperatureHumidityData; this.TemperatureHumidity.Req = evmDataInfo;
this.Publish(temperatureHumidityData); this.Publish(evmDataInfo);
return TemperatureHumidity.GetResp(timeSpan); return TemperatureHumidity.GetResp(timeSpan);
} }
/// <summary> /// <summary>
/// 上传换电订单 /// 上传换电订单
/// </summary> /// </summary>
/// <param name="uploadSwapOrder"></param> /// <param name="staSwapRecord"></param>
/// <param name="timeSpan"></param> /// <param name="timeSpan"></param>
/// <returns></returns> /// <returns></returns>
public UploadSwapOrderResp? SendUploadPowerChangeOrder(UploadSwapOrder uploadSwapOrder, TimeSpan? timeSpan = null) public StaSwapRecordRes? SendUploadPowerChangeOrder(StaSwapRecord staSwapRecord, TimeSpan? timeSpan = null)
{ {
this.UploadPowerChange.Req = uploadSwapOrder; this.UploadPowerChange.Req = staSwapRecord;
this.Publish(uploadSwapOrder); this.Publish(staSwapRecord);
return UploadPowerChange.GetResp(timeSpan); return UploadPowerChange.GetResp(timeSpan);
} }
public VehicleDataReportingResp? SendVehicleDataReporting(VehicleDataReporting vehicleDataReporting, public CardataReportRes? SendVehicleDataReporting(CardataReport cardataReport,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {
this.VehicleData.Req = vehicleDataReporting; this.VehicleData.Req = cardataReport;
this.Publish(vehicleDataReporting); this.Publish(cardataReport);
return VehicleData.GetResp(timeSpan); return VehicleData.GetResp(timeSpan);
} }
@ -523,6 +553,76 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
return ChargeDevDataInfo.GetResp(timeSpan); return ChargeDevDataInfo.GetResp(timeSpan);
} }
public BatteryTotalRes? SendBatteryTotal(BatteryTotal req, TimeSpan? timeSpan = null)
{
this.BatteryTotal.Req = req;
this.Publish(req);
return BatteryTotal.GetResp(timeSpan);
}
public ChargingTotalDisRes? SendChargingTotalDis(ChargingTotalDis req, TimeSpan? timeSpan = null)
{
this.ChargingTotalDis.Req = req;
this.Publish(req);
return ChargingTotalDis.GetResp(timeSpan);
}
public PowerTotalRes? SendPowerTotal(PowerTotal req, TimeSpan? timeSpan = null)
{
this.PowerTotal.Req = req;
this.Publish(req);
return PowerTotal.GetResp(timeSpan);
}
public StaChargingTotalRes? SendStaChargingTotal(StaChargingTotal req, TimeSpan? timeSpan = null)
{
this.StaChargingTotal.Req = req;
this.Publish(req);
return StaChargingTotal.GetResp(timeSpan);
}
public MeterEnergyKwhRes? SendMeterEnergyKwh(MeterEnergyKwh req, TimeSpan? timeSpan = null)
{
this.MeterEnergyKwh.Req = req;
this.Publish(req);
return MeterEnergyKwh.GetResp(timeSpan);
}
public MeterDayEnergyValRes? SendMeterDayEnergyVal(MeterDayEnergyVal req, TimeSpan? timeSpan = null)
{
this.MeterDayEnergyVal.Req = req;
this.Publish(req);
return MeterDayEnergyVal.GetResp(timeSpan);
}
public StaHourEnergyValRes? SendStaHourEnergyVal(StaHourEnergyVal req, TimeSpan? timeSpan = null)
{
this.StaHourEnergyVal.Req = req;
this.Publish(req);
return StaHourEnergyVal.GetResp(timeSpan);
}
public StaDayEnergyValRes? SendStaDayEnergyVal(StaDayEnergyVal req, TimeSpan? timeSpan = null)
{
this.StaDayEnergyVal.Req = req;
this.Publish(req);
return StaDayEnergyVal.GetResp(timeSpan);
}
public StaDayOpeEnergyValRes? SendStaDayOpeEnergyVal(StaDayOpeEnergyVal req, TimeSpan? timeSpan = null)
{
this.StaDayOpeEnergyVal.Req = req;
this.Publish(req);
return StaDayOpeEnergyVal.GetResp(timeSpan);
}
public StaHourAmountValRes? SendStaHourAmountVal(StaHourAmountVal req, TimeSpan? timeSpan = null)
{
this.StaHourAmountVal.Req = req;
this.Publish(req);
return StaHourAmountVal.GetResp(timeSpan);
}
public PileEndChargeResp? SendPileEndCharge(PileEndCharge req, TimeSpan? timeSpan = null) public PileEndChargeResp? SendPileEndCharge(PileEndCharge req, TimeSpan? timeSpan = null)
{ {
this.PileEndCharge.Req = req; this.PileEndCharge.Req = req;

@ -4,45 +4,20 @@ public class CloudConst
{ {
#region cmd definition #region cmd definition
public static readonly string signIn = "signIn"; #region 站端发云端收
public static readonly string signInRes = "signInRes";
public static readonly string carAuth = "carAuth"; public static readonly string carAuth = "carAuth";
public static readonly string carAuthRes = "carAuthRes"; public static readonly string carAuthRes = "carAuthRes";
public static readonly string carCanStart = "carCanStart";
public static readonly string carCanStartRes = "carCanStartRes";
/// <summary>
/// 2 换电车辆数据上报
/// </summary>
public static readonly string CardataReport = "CardataReport"; public static readonly string CardataReport = "CardataReport";
public static readonly string CardataReportRes = "CardataReportRes"; public static readonly string CardataReportRes = "CardataReportRes";
public static readonly string setStBaseInfo = "setStBaseInfo"; public static readonly string signIn = "signIn";
public static readonly string setStBaseInfoRes = "setStBaseInfoRes"; public static readonly string signInRes = "signInRes";
public static readonly string devList = "devList"; public static readonly string devList = "devList";
public static readonly string devListRep = "devListRep"; public static readonly string devListRep = "devListRep";
public static readonly string setService = "setService";
public static readonly string setServiceRes = "setServiceRes";
public static readonly string setOpTime = "setOpTime";
public static readonly string setOpTimeRes = "setOpTimeRes";
public static readonly string setOpModel = "setOpModel";
public static readonly string setOpModelRes = "setOpModelRes";
public static readonly string setStaPrice = "setStaPrice";
public static readonly string setStaPriceRes = "setStaPriceRes";
public static readonly string setChargePrice = "setChargePrice";
public static readonly string setChargePriceRes = "setChargePriceRes";
public static readonly string setChangeCarData = "setChangeCarData";
public static readonly string setChangeCarDataRes = "setChangeCarDataRes";
public static readonly string setConfig = "setConfig";
public static readonly string setConfigRes = "setConfigRes";
public static readonly string getConfig = "getConfig";
public static readonly string getConfigRes = "getConfigRes";
public static readonly string staSwapRecord = "staSwapRecord"; public static readonly string staSwapRecord = "staSwapRecord";
public static readonly string staSwapRecordRes = "staSwapRecordRes"; public static readonly string staSwapRecordRes = "staSwapRecordRes";
public static readonly string amtBat = "amtBat";
public static readonly string amtBatRes = "amtBatRes";
public static readonly string ChargeRecordReport = "ChargeRecordReport"; public static readonly string ChargeRecordReport = "ChargeRecordReport";
public static readonly string ChargeRecordReportsRes = "ChargeRecordReportsRes"; public static readonly string ChargeRecordReportsRes = "ChargeRecordReportsRes";
public static readonly string ChargeRecordUpLoad = "ChargeRecordUpLoad";
public static readonly string ChargeRecordUpLoadRes = "ChargeRecordUploadRes";
public static readonly string stationRunStatus = "stationRunStatus"; public static readonly string stationRunStatus = "stationRunStatus";
public static readonly string stationRunStatusRes = "stationRunStatusRes"; public static readonly string stationRunStatusRes = "stationRunStatusRes";
public static readonly string stationChnRunStatus = "stationChnRunStatus"; public static readonly string stationChnRunStatus = "stationChnRunStatus";
@ -61,25 +36,60 @@ public class CloudConst
public static readonly string chargeDevDataInfoRes = "chargeDevDataInfoRes"; public static readonly string chargeDevDataInfoRes = "chargeDevDataInfoRes";
public static readonly string batDataInfo = "batDataInfo"; public static readonly string batDataInfo = "batDataInfo";
public static readonly string batDataInfoRes = "batDataInfoRes"; public static readonly string batDataInfoRes = "batDataInfoRes";
public static readonly string ChargeRecordUpLoad = "ChargeRecordUpLoad";
public static readonly string ChargeRecordUpLoadRes = "ChargeRecordUploadRes";
public static readonly string batteryTotal = "batteryTotal";
public static readonly string batteryTotalRes = "batteryTotalRes"; public static readonly string batteryTotalRes = "batteryTotalRes";
public static readonly string meterDayEnergyValRes = "meterDayEnergyValRes"; public static readonly string chargingTotalDis = "chargingTotalDis";
public static readonly string meterEnergyKwhRes = "meterEnergyKwhRes"; public static readonly string chargingTotaDislRes = "chargingTotaDislRes";
public static readonly string powerTotal = "powerTotal";
public static readonly string powerTotalRes = "powerTotalRes"; public static readonly string powerTotalRes = "powerTotalRes";
public static readonly string staChargingTotal = "staChargingTotal";
public static readonly string staChargingTotalRes = "staChargingTotalRes"; public static readonly string staChargingTotalRes = "staChargingTotalRes";
public static readonly string staDayEnergyValRes = "staDayEnergyValRes"; public static readonly string meterEnergyKwh = "meterEnergyKwh";
public static readonly string staDayOpeEnergyValRes = "staDayOpeEnergyValRes"; public static readonly string meterEnergyKwhRes = "meterEnergyKwhRes";
public static readonly string staHourAmountValRes = "staHourAmountValRes";
public static readonly string staHourEnergyValRes = "staHourEnergyValRes";
public static readonly string batteryTotal = "batteryTotal";
public static readonly string chargingTotalDis = "chargingTotalDis";
public static readonly string meterDayEnergyVal = "meterDayEnergyVal"; public static readonly string meterDayEnergyVal = "meterDayEnergyVal";
public static readonly string meterDayEnergyValRes = "meterDayEnergyValRes";
public static readonly string staHourEnergyVal = "staHourEnergyVal"; public static readonly string staHourEnergyVal = "staHourEnergyVal";
public static readonly string staHourAmountVal = "staHourAmountVal"; public static readonly string staHourEnergyValRes = "staHourEnergyValRes";
public static readonly string staDayEnergyVal = "staDayEnergyVal"; public static readonly string staDayEnergyVal = "staDayEnergyVal";
public static readonly string staChargingTotal = "staChargingTotal"; public static readonly string staDayEnergyValRes = "staDayEnergyValRes";
public static readonly string meterEnergyKwh = "meterEnergyKwh";
public static readonly string powerTotal = "powerTotal";
public static readonly string staDayOpeEnergyVal = "staDayOpeEnergyVal"; public static readonly string staDayOpeEnergyVal = "staDayOpeEnergyVal";
public static readonly string staDayOpeEnergyValRes = "staDayOpeEnergyValRes";
public static readonly string staHourAmountVal = "staHourAmountVal";
public static readonly string staHourAmountValRes = "staHourAmountValRes";
#endregion
#region 云端发站端收
public static readonly string carCanStart = "carCanStart";
public static readonly string carCanStartRes = "carCanStartRes";
public static readonly string setStBaseInfo = "setStBaseInfo";
public static readonly string setStBaseInfoRes = "setStBaseInfoRes";
public static readonly string setService = "setService";
public static readonly string setServiceRes = "setServiceRes";
public static readonly string setOpTime = "setOpTime";
public static readonly string setOpTimeRes = "setOpTimeRes";
public static readonly string setOpModel = "setOpModel";
public static readonly string setOpModelRes = "setOpModelRes";
public static readonly string setStaPrice = "setStaPrice";
public static readonly string setStaPriceRes = "setStaPriceRes";
public static readonly string setChargePrice = "setChargePrice";
public static readonly string setChargePriceRes = "setChargePriceRes";
public static readonly string setChangeCarData = "setChangeCarData";
public static readonly string setChangeCarDataRes = "setChangeCarDataRes";
public static readonly string setConfig = "setConfig";
public static readonly string setConfigRes = "setConfigRes";
public static readonly string getConfig = "getConfig";
public static readonly string getConfigRes = "getConfigRes";
#endregion
public static readonly string amtBat = "amtBat";
public static readonly string amtBatRes = "amtBatRes";
/// <summary> /// <summary>
/// 站外 /// 站外

@ -29,7 +29,7 @@ public class BatteryOperatingModelHandler: IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
BatteryOperatingModel? req = JsonConvert.DeserializeObject<BatteryOperatingModel>(t); SetOpModel? req = JsonConvert.DeserializeObject<SetOpModel>(t);
if (req != null) if (req != null)
{ {
@ -61,8 +61,8 @@ public class BatteryOperatingModelHandler: IBaseHandler
BatteryOperatingModelResp resp = new BatteryOperatingModelResp(); SetOpModelRes res = new SetOpModelRes();
CloudClientMgr.CloudClient?.Publish(resp); CloudClientMgr.CloudClient?.Publish(res);
} }
} }
} }

@ -19,7 +19,7 @@ public class BusinessHourHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
BusinessHour? req = JsonConvert.DeserializeObject<BusinessHour>(t); SetOpTime? req = JsonConvert.DeserializeObject<SetOpTime>(t);
if (req != null) if (req != null)
{ {
List<SEG> reqSeg = req.seg; List<SEG> reqSeg = req.seg;
@ -29,7 +29,7 @@ public class BusinessHourHandler : IBaseHandler
StaticStationInfo.OperationEndTime = reqSeg.Select(i => i.et).Join(); StaticStationInfo.OperationEndTime = reqSeg.Select(i => i.et).Join();
} }
BusinessHourResp resp = new BusinessHourResp(); SetOpTimeRes resp = new SetOpTimeRes();
CloudClientMgr.CloudClient?.Publish(resp); CloudClientMgr.CloudClient?.Publish(resp);
} }
} }

@ -17,7 +17,7 @@ public class CarAuthResHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
VehicleCertificationResp? resp = JsonConvert.DeserializeObject<VehicleCertificationResp>(t); CarAuthRes? resp = JsonConvert.DeserializeObject<CarAuthRes>(t);
CloudClientMgr.CloudClient.CarAuth.SetResp(resp); CloudClientMgr.CloudClient.CarAuth.SetResp(resp);
} }
} }

@ -30,7 +30,7 @@ public class ChargerElectricityPriceModelHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
ChargerElectricityPriceModel? priceModel = JsonConvert.DeserializeObject<ChargerElectricityPriceModel>(t); SetChargePrice? priceModel = JsonConvert.DeserializeObject<SetChargePrice>(t);
if (priceModel != null) if (priceModel != null)
{ {
ElecPriceModelVersion version = _versionRepository.QueryByClause(d => d.Version == priceModel.ceid); ElecPriceModelVersion version = _versionRepository.QueryByClause(d => d.Version == priceModel.ceid);
@ -63,7 +63,7 @@ public class ChargerElectricityPriceModelHandler : IBaseHandler
_detailRepository.Insert(versionDetails); _detailRepository.Insert(versionDetails);
} }
ChargerElectricityPriceModelResp resp = new ChargerElectricityPriceModelResp(); SetChargePriceRes resp = new SetChargePriceRes();
CloudClientMgr.CloudClient?.Publish(resp); CloudClientMgr.CloudClient?.Publish(resp);
} }
} }

@ -18,7 +18,7 @@ public class DeliverBasicInformationHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
DeliverBasicInformation? deliverBasicInformation = JsonConvert.DeserializeObject<DeliverBasicInformation>(t); SetStBaseInfo? deliverBasicInformation = JsonConvert.DeserializeObject<SetStBaseInfo>(t);
if (deliverBasicInformation != null) if (deliverBasicInformation != null)
{ {
StaticStationInfo.StationNo = deliverBasicInformation.sn; StaticStationInfo.StationNo = deliverBasicInformation.sn;
@ -26,7 +26,7 @@ public class DeliverBasicInformationHandler : IBaseHandler
StaticStationInfo.StationSn = deliverBasicInformation.SS; StaticStationInfo.StationSn = deliverBasicInformation.SS;
//TODO 补全StaticStationInfo后赋值 //TODO 补全StaticStationInfo后赋值
DeliverBasicInformationResp resp = new DeliverBasicInformationResp(); SetStBaseInfoRes resp = new SetStBaseInfoRes();
CloudClientMgr.CloudClient?.Publish(resp); CloudClientMgr.CloudClient?.Publish(resp);
} }
} }

@ -18,10 +18,10 @@ public class ParameterAcquisitionHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
ParameterAcquisition? req = JsonConvert.DeserializeObject<ParameterAcquisition>(t); GetConfig? req = JsonConvert.DeserializeObject<GetConfig>(t);
if (req != null) if (req != null)
{ {
ParameterAcquisitionResp resp = new ParameterAcquisitionResp(); GetConfigRes resp = new GetConfigRes();
resp.chsoc = Convert.ToChar(StaticStationInfo.SwapSoc); resp.chsoc = Convert.ToChar(StaticStationInfo.SwapSoc);
resp.eid = StaticStationInfo.Eid; resp.eid = StaticStationInfo.Eid;
resp.oid = StaticStationInfo.Oid; resp.oid = StaticStationInfo.Oid;

@ -19,7 +19,7 @@ public class ServiceableStateHandler:IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
ServiceableState? req = JsonConvert.DeserializeObject<ServiceableState>(t); SetServiceRes? req = JsonConvert.DeserializeObject<SetServiceRes>(t);
if (req != null) if (req != null)
{ {
StaticStationInfo.StationStatus = req.st; StaticStationInfo.StationStatus = req.st;

@ -18,7 +18,7 @@ public class SetConfigurationParametersHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
SetConfigurationParameters? setConfigurationParameters = JsonConvert.DeserializeObject<SetConfigurationParameters>(t); SetConfig? setConfigurationParameters = JsonConvert.DeserializeObject<SetConfig>(t);
if (setConfigurationParameters != null) if (setConfigurationParameters != null)
{ {
char chsoc = setConfigurationParameters.chsoc; char chsoc = setConfigurationParameters.chsoc;
@ -27,7 +27,7 @@ public class SetConfigurationParametersHandler : IBaseHandler
StaticStationInfo.Oid = setConfigurationParameters.oid; StaticStationInfo.Oid = setConfigurationParameters.oid;
StaticStationInfo.Ceid = setConfigurationParameters.ceid; StaticStationInfo.Ceid = setConfigurationParameters.ceid;
SetConfigurationParametersResp resp = new SetConfigurationParametersResp(); SetConfigRes resp = new SetConfigRes();
CloudClientMgr.CloudClient?.Publish(resp); CloudClientMgr.CloudClient?.Publish(resp);
} }
} }

@ -12,7 +12,7 @@ public class SignInRespHandler : IBaseHandler
public void Handle(string t) public void Handle(string t)
{ {
SignInResp? signInResp = JsonConvert.DeserializeObject<SignInResp>(t); SignInRes? signInResp = JsonConvert.DeserializeObject<SignInRes>(t);
if (signInResp != null) if (signInResp != null)
{ {
CloudClientMgr.CloudClient.Authed = signInResp.re == 0; CloudClientMgr.CloudClient.Authed = signInResp.re == 0;

@ -16,7 +16,7 @@ public class UploadSwapOrderResHandler : IBaseHandler
public SwapOrderRepository SwapOrderRepository { get; set; } public SwapOrderRepository SwapOrderRepository { get; set; }
public void Handle(string t) public void Handle(string t)
{ {
UploadSwapOrderResp? resp = JsonConvert.DeserializeObject<UploadSwapOrderResp>(t); StaSwapRecordRes? resp = JsonConvert.DeserializeObject<StaSwapRecordRes>(t);
if (resp != null) if (resp != null)
{ {
if (CloudClientMgr.CloudClient != null) if (CloudClientMgr.CloudClient != null)

@ -5,7 +5,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.12.1 后台服务器下发参数获取 /// 3.2.12.1 后台服务器下发参数获取
/// </summary> /// </summary>
public class ParameterAcquisition : ICmd public class GetConfig : ICmd
{ {
/// <summary> /// <summary>
/// 自定义 /// 自定义

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.10.1 后台服务器下发离线换电车辆数据 /// 3.2.10.1 后台服务器下发离线换电车辆数据
/// </summary> /// </summary>
public class OfflinePowerOnVehicleData : ICmd public class SetChangeCarData : ICmd
{ {
/// <summary> /// <summary>
/// 更新方式 /// 更新方式

@ -5,7 +5,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.9.1 后台服务器下发换电站充电机的电价模型 /// 3.2.9.1 后台服务器下发换电站充电机的电价模型
/// </summary> /// </summary>
public class ChargerElectricityPriceModel : ICmd public class SetChargePrice : ICmd
{ {
/// <summary> /// <summary>
/// 更新时间 /// 更新时间

@ -11,7 +11,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.11.1 后台服务器下发设置配置参数 /// 3.2.11.1 后台服务器下发设置配置参数
/// </summary> /// </summary>
public class SetConfigurationParameters : ICmd public class SetConfig : ICmd
{ {
/// <summary> /// <summary>
/// 可换 soc 阈值 /// 可换 soc 阈值

@ -5,7 +5,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.7.1 后台服务器下发换电站的电池运营模型 /// 3.2.7.1 后台服务器下发换电站的电池运营模型
/// </summary> /// </summary>
public class BatteryOperatingModel : ICmd public class SetOpModel : ICmd
{ {
/// <summary> /// <summary>
/// 运营模型ID /// 运营模型ID

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.6.1 后台服务器设置换电站的营业时段 /// 3.2.6.1 后台服务器设置换电站的营业时段
/// </summary> /// </summary>
public class BusinessHour : ICmd public class SetOpTime : ICmd
{ {
/// <summary> /// <summary>
/// 更新时间 /// 更新时间

@ -0,0 +1,19 @@
using Service.Cloud.Common;
namespace Service.Cloud.Msg.Cloud.Req;
/// <summary>
/// 3.2.5.1 后台服务器下发换电站的可服务状态设置
/// </summary>
public class SetService: ICmd
{
/// <summary>
/// 服务状态 1:换电站服务启用 2:换电站服务停用
/// </summary>
public int st { get; set; }
public string GetCmd()
{
return CloudConst.setService;
}
}

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.5.1 后台服务器下发换电站的可服务状态设置 /// 3.2.5.1 后台服务器下发换电站的可服务状态设置
/// </summary> /// </summary>
public class ServiceableState : ICmd public class SetServiceRes : ICmd
{ {
/// <summary> /// <summary>
/// 服务状态 /// 服务状态

@ -5,7 +5,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.3.1 后台服务器下发换电站的基础信息 /// 3.2.3.1 后台服务器下发换电站的基础信息
/// </summary> /// </summary>
public class DeliverBasicInformation : ICmd public class SetStBaseInfo : ICmd
{ {
/// <summary> /// <summary>
/// 电站编码 /// 电站编码

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Req
/// <summary> /// <summary>
/// 3.2.8.1 后台服务器下发换电站的电价模型 /// 3.2.8.1 后台服务器下发换电站的电价模型
/// </summary> /// </summary>
public class ElectricityPriceModel : ICmd public class SetStaPrice : ICmd
{ {
/// <summary> /// <summary>
/// 计费模型ID /// 计费模型ID

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 4.2.7.2 云平台反馈换电站空调数据信息 /// 4.2.7.2 云平台反馈换电站空调数据信息
/// </summary> /// </summary>
public class AirConditioningDataResp : ICmd public class AcDataInfoRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 2.1.1.2 后台应答换电站车辆认证的结果 /// 2.1.1.2 后台应答换电站车辆认证的结果
/// </summary> /// </summary>
public class VehicleCertificationResp : ICmd public class CarAuthRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 2.1.3.3 云平台反馈换电车辆数据上报 /// 2.1.3.3 云平台反馈换电车辆数据上报
/// </summary> /// </summary>
public class VehicleDataReportingResp : ICmd public class CardataReportRes : ICmd
{ {
/// <summary> /// <summary>
/// 接收结果 /// 接收结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 云平台反馈换电站状态上报 /// 云平台反馈换电站状态上报
/// </summary> /// </summary>
public class ChargeRecordReportingResp : ICmd public class ChargeRecordReportRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 3.2.4. 2 后台应答/请求设备列表上报 /// 3.2.4. 2 后台应答/请求设备列表上报
/// </summary> /// </summary>
public class ReportingDeviceListResp : ICmd public class DevListRes : ICmd
{ {
/// <summary> /// <summary>
/// 操作类型 /// 操作类型

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 4.2.8.2 云平台反馈设备状态开始日志信息 /// 4.2.8.2 云平台反馈设备状态开始日志信息
/// </summary> /// </summary>
public class StartLogMessageResp : ICmd public class EqmStateStartLogInfoRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 4.2.6.2 云平台反馈换电站温湿度数据信息 /// 4.2.6.2 云平台反馈换电站温湿度数据信息
/// </summary> /// </summary>
public class TemperatureHumidityDataResp : ICmd public class EvmDataInfoRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 2 云平台反馈设备实时故障信息 /// 2 云平台反馈设备实时故障信息
/// </summary> /// </summary>
public class RealTimeFaultInfoResp : ICmd public class FaultReportRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -4,7 +4,7 @@ namespace Service.Cloud.Msg.Cloud.Resp;
/// <summary> /// <summary>
/// 3.2.2 后台应答签到的结果 /// 3.2.2 后台应答签到的结果
/// </summary> /// </summary>
public class SignInResp : ICmd public class SignInRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 4.2.1.2 后台服务器应答换电站上报的订单信息 /// 4.2.1.2 后台服务器应答换电站上报的订单信息
/// </summary> /// </summary>
public class UploadSwapOrderResp : ICmd public class StaSwapRecordRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 3 云平台反馈换电站通道状态上报 /// 3 云平台反馈换电站通道状态上报
/// </summary> /// </summary>
public class ChannelStatusReportingResp : ICmd public class StationChnRunStatusRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Cloud.Resp
/// <summary> /// <summary>
/// 4.2.3.3 云平台反馈换电站状态上报 /// 4.2.3.3 云平台反馈换电站状态上报
/// </summary> /// </summary>
public class HostStatusReportedResp : ICmd public class StationRunStatusRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.7.1 换电站空调数据信息 /// 4.2.7.1 换电站空调数据信息
/// </summary> /// </summary>
public class AirConditioningData : ICmd public class AcDataInfo : ICmd
{ {
/// <summary> /// <summary>
/// 场站编码 /// 场站编码

@ -11,7 +11,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 2.1.1.1 换电站进行车辆认证 /// 2.1.1.1 换电站进行车辆认证
/// </summary> /// </summary>
public class VehicleCertification : ICmd public class CarAuth : ICmd
{ {
/// <summary> /// <summary>
/// 认证方式 /// 认证方式

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 换电车辆数据上报 /// 换电车辆数据上报
/// </summary> /// </summary>
public class VehicleDataReporting : ICmd public class CardataReport : ICmd
{ {
/// <summary> /// <summary>
/// 订单号 /// 订单号

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.2.2 充电记录上报 /// 4.2.2.2 充电记录上报
/// </summary> /// </summary>
public class ChargeRecordReporting : ICmd public class ChargeRecordReport : ICmd
{ {
/// <summary> /// <summary>
/// 充电流水号 /// 充电流水号

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 3.2.4 换电站上报设备列表 /// 3.2.4 换电站上报设备列表
/// </summary> /// </summary>
public class ReportingDeviceList : ICmd public class DevList : ICmd
{ {
/// <summary> /// <summary>
/// 操作类型 /// 操作类型

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.8.1 换电站设备状态开始日志信息 /// 4.2.8.1 换电站设备状态开始日志信息
/// </summary> /// </summary>
public class StartLogMessage : ICmd public class EqmStateStartLogInfo : ICmd
{ {
/// <summary> /// <summary>
/// 设备编号 /// 设备编号

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.6.1 换电站温湿度数据信息 /// 4.2.6.1 换电站温湿度数据信息
/// </summary> /// </summary>
public class TemperatureHumidityData : ICmd public class EvmDataInfo : ICmd
{ {
/// <summary> /// <summary>
/// 场站编码 /// 场站编码

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.5.1 换电站设备实时故障信息 /// 4.2.5.1 换电站设备实时故障信息
/// </summary> /// </summary>
public class RealTimeFaultInfo : ICmd public class FaultReport : ICmd
{ {
/// <summary> /// <summary>
/// 场站編码 /// 场站編码

@ -33,7 +33,7 @@ namespace Service.Cloud.Msg.Host.Req
public string GetCmd() public string GetCmd()
{ {
return CloudConst.setOpModelRes; return CloudConst.stationRunStatus;
} }
} }
} }

@ -84,8 +84,4 @@ public class SingleBatInfo
/// </summary> /// </summary>
public DateTime bt { get; set; } public DateTime bt { get; set; }
public string GetCmd()
{
return CloudConst.batDataInfo;
}
} }

@ -1,70 +1,83 @@
using Service.Cloud.Common; using Service.Cloud.Common;
namespace Service.Cloud.Msg.Host; namespace Service.Cloud.Msg.Host.Req;
/// <summary> /// <summary>
/// 5.2.17 换电站日运行统计结果信息 /// 5.2.17 换电站日运行统计结果信息
/// </summary> /// </summary>
public class StaDayOpeEnergyVal public class StaDayOpeEnergyVal : ICmd
{ {
/// <summary> /// <summary>
/// 换电站编码 换电站唯一码,区域码+ 类型码+流水号 /// 换电站编码 换电站唯一码,区域码+ 类型码+流水号
/// </summary> /// </summary>
public string sn { get; set; } public string sn { get; set; }
/// <summary> /// <summary>
/// 换电站名称 ****换电站 /// 换电站名称 ****换电站
/// </summary> /// </summary>
public string sm { get; set; } public string sm { get; set; }
/// <summary> /// <summary>
/// 运行开始时间 比如08:00 /// 运行开始时间 比如08:00
/// </summary> /// </summary>
public DateTime st { get; set; } public DateTime st { get; set; }
/// <summary> /// <summary>
/// 运行结束时间 比如18:00 /// 运行结束时间 比如18:00
/// </summary> /// </summary>
public DateTime et { get; set; } public DateTime et { get; set; }
/// <summary> /// <summary>
/// 站运行总时长 单位:分钟 /// 站运行总时长 单位:分钟
/// </summary> /// </summary>
public int tt { get; set; } public int tt { get; set; }
/// <summary> /// <summary>
/// 首次换电时刻 格式 ”yyyy-MM-dd HH:mm:ss ” /// 首次换电时刻 格式 ”yyyy-MM-dd HH:mm:ss ”
/// </summary> /// </summary>
public DateTime ft { get; set; } public DateTime ft { get; set; }
/// <summary> /// <summary>
/// 结束换电时刻 格式 ”yyyy-MM-dd HH:mm:ss ” /// 结束换电时刻 格式 ”yyyy-MM-dd HH:mm:ss ”
/// </summary> /// </summary>
public DateTime sp { get; set; } public DateTime sp { get; set; }
/// <summary> /// <summary>
/// 换电总时长 单位: 秒 /// 换电总时长 单位: 秒
/// </summary> /// </summary>
public float ts { get; set; } public float ts { get; set; }
/// <summary> /// <summary>
/// 换电总次数 换电总次数 /// 换电总次数 换电总次数
/// </summary> /// </summary>
public int tc { get; set; } public int tc { get; set; }
/// <summary> /// <summary>
/// 充电总次数 充电总次数 /// 充电总次数 充电总次数
/// </summary> /// </summary>
public int cc { get; set; } public int cc { get; set; }
/// <summary> /// <summary>
/// 运营状态 /// 运营状态
/// </summary> /// </summary>
public byte os { get; set; } public byte os { get; set; }
/// <summary> /// <summary>
/// 平均换电时长 单位:秒 /// 平均换电时长 单位:秒
/// </summary> /// </summary>
public float at { get; set; } public float at { get; set; }
/// <summary> /// <summary>
/// 平均充电时长 单位:分钟 /// 平均充电时长 单位:分钟
/// </summary> /// </summary>
public float ct { get; set; } public float ct { get; set; }
/// <summary> /// <summary>
/// 换电日期 精确到 日。格式 ” yyyy-MM-dd”如2020-11-20) /// 换电日期 精确到 日。格式 ” yyyy-MM-dd”如2020-11-20)
/// </summary> /// </summary>
public DateTime dt { get; set; } public DateTime dt { get; set; }
public string GetCmd() public string GetCmd()
{ {
return CloudConst.staDayOpeEnergyVal; return CloudConst.staDayOpeEnergyVal;

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.1.1 换电上传换电订单 /// 4.2.1.1 换电上传换电订单
/// </summary> /// </summary>
public class UploadSwapOrder : ICmd public class StaSwapRecord : ICmd
{ {
/// <summary> /// <summary>
/// 换电站编码 /// 换电站编码

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Req
/// <summary> /// <summary>
/// 4.2.4.2 换电站通道状态上报 /// 4.2.4.2 换电站通道状态上报
/// </summary> /// </summary>
public class ChannelStatusReporting : ICmd public class StationChnRunStatus : ICmd
{ {
/// <summary> /// <summary>
/// 换电通道编号 /// 换电通道编号

@ -0,0 +1,23 @@
using Service.Cloud.Common;
namespace Service.Cloud.Msg.Host.Req;
public class StationRunStatus : ICmd
{
/// <summary>
/// 服务状态 0未知 1:换电站服务启用 2:换电站服务停用
/// </summary>
public int rs { get; set; }
/// <summary>
/// 换电站运营状态 1营业状态 2暂停营业状态 3设备维护状态 4歇业状态
/// </summary>
public int os { get; set; }
/// <summary>
/// 换电站总体故障等级 参考 1.4 中故障等级定义
/// </summary>
public int fl { get; set; }
public string GetCmd()
{
return CloudConst.stationRunStatus;
}
}

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 2 换电站应答车辆开始换电指令 /// 2 换电站应答车辆开始换电指令
/// </summary> /// </summary>
public class PowerChangeCommandResp : ICmd public class CarCanStartRes : ICmd
{ {
/// <summary> /// <summary>
/// 接收结果 /// 接收结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.11.2 换电站应答后台服务器下发参数获取 /// 3.2.11.2 换电站应答后台服务器下发参数获取
/// </summary> /// </summary>
public class ParameterAcquisitionResp : ICmd public class GetConfigRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.9.2 换电站应答后台服务器下发离线换电车辆数据 /// 3.2.9.2 换电站应答后台服务器下发离线换电车辆数据
/// </summary> /// </summary>
public class OfflinePowerOnVehicleDataResp : ICmd public class SetChangeCarDataRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 2 换电站应答后台服务器下发换电站充电电价模型 /// 2 换电站应答后台服务器下发换电站充电电价模型
/// </summary> /// </summary>
public class ChargerElectricityPriceModelResp : ICmd public class SetChargePriceRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 1.2 换电站应答后台服务器下发参数设置 /// 1.2 换电站应答后台服务器下发参数设置
/// </summary> /// </summary>
public class SetConfigurationParametersResp : ICmd public class SetConfigRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.7.2 换电站应答后台服务器设置换电站的电池运营模型 /// 3.2.7.2 换电站应答后台服务器设置换电站的电池运营模型
/// </summary> /// </summary>
public class BatteryOperatingModelResp : ICmd public class SetOpModelRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.6.2 换电站应答后台服务器下发后台服务器设置换电站的营业时段 /// 3.2.6.2 换电站应答后台服务器下发后台服务器设置换电站的营业时段
/// </summary> /// </summary>
public class BusinessHourResp : ICmd public class SetOpTimeRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -5,7 +5,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.3.2 换电站应答后台服务器下发换电站的基础信息 /// 3.2.3.2 换电站应答后台服务器下发换电站的基础信息
/// </summary> /// </summary>
public class DeliverBasicInformationResp : ICmd public class SetStBaseInfoRes : ICmd
{ {
/// <summary> /// <summary>
/// 应答结果 /// 应答结果

@ -10,7 +10,7 @@ namespace Service.Cloud.Msg.Host.Resp
/// <summary> /// <summary>
/// 3.2.9.1 后台服务器下发换电站充电机的电价模型 /// 3.2.9.1 后台服务器下发换电站充电机的电价模型
/// </summary> /// </summary>
public class ElectricityPriceModelResp : ICmd public class SetStaPriceRes : ICmd
{ {
/// <summary> /// <summary>
/// 更新时间 /// 更新时间

@ -24,10 +24,10 @@ public abstract class CloudApi
/// </summary> /// </summary>
/// <param name="rfidReadModel"></param> /// <param name="rfidReadModel"></param>
/// <returns></returns> /// <returns></returns>
public static VehicleCertificationResp? VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder) public static CarAuthRes? VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder)
{ {
VehicleCertification vehicleCertification = new() CarAuth carAuth = new()
{ {
ty = 2, ty = 2,
rfid = rfidReadModel.VelVin, rfid = rfidReadModel.VelVin,
@ -40,9 +40,9 @@ public abstract class CloudApi
}; };
Log.Info( Log.Info(
$" CloudApi VehicleCheck SendVehicleCertification param={JsonConvert.SerializeObject(vehicleCertification)}"); $" CloudApi VehicleCheck SendVehicleCertification param={JsonConvert.SerializeObject(carAuth)}");
VehicleCertificationResp? sendVehicleCertification = CarAuthRes? sendVehicleCertification =
CloudClientMgr.CloudClient?.SendVehicleCertification(vehicleCertification, CloudClientMgr.CloudClient?.SendVehicleCertification(carAuth,
global::System.TimeSpan.FromSeconds(TimeSpan)); global::System.TimeSpan.FromSeconds(TimeSpan));
Log.Info( Log.Info(
@ -62,7 +62,7 @@ public abstract class CloudApi
,SwapOrderReportCloud orderReportCloud) ,SwapOrderReportCloud orderReportCloud)
{ {
UploadSwapOrder uploadSwapOrder = new() StaSwapRecord staSwapRecord = new()
{ {
rfid = swapOrder.VehicleVin, rfid = swapOrder.VehicleVin,
sn = StaticStationInfo.StationNo, sn = StaticStationInfo.StationNo,
@ -91,10 +91,10 @@ public abstract class CloudApi
vtm=orderReportCloud.Vtm, vtm=orderReportCloud.Vtm,
}; };
Log.Info( Log.Info(
$" CloudApi UploadSwapOrder seq={seq} SendUploadPowerChangeOrder param={JsonConvert.SerializeObject(uploadSwapOrder)}"); $" CloudApi UploadSwapOrder seq={seq} SendUploadPowerChangeOrder param={JsonConvert.SerializeObject(staSwapRecord)}");
UploadSwapOrderResp? sendUploadPowerChangeOrder = CloudClientMgr.CloudClient?.SendUploadPowerChangeOrder( StaSwapRecordRes? sendUploadPowerChangeOrder = CloudClientMgr.CloudClient?.SendUploadPowerChangeOrder(
uploadSwapOrder, staSwapRecord,
global::System.TimeSpan.FromSeconds(TimeSpan)); global::System.TimeSpan.FromSeconds(TimeSpan));
Log.Info( Log.Info(
$" CloudApi UploadSwapOrder seq={seq} SendUploadPowerChangeOrder resp={JsonConvert.SerializeObject(sendUploadPowerChangeOrder)}"); $" CloudApi UploadSwapOrder seq={seq} SendUploadPowerChangeOrder resp={JsonConvert.SerializeObject(sendUploadPowerChangeOrder)}");
@ -114,11 +114,11 @@ public abstract class CloudApi
/// <param name="state"></param> /// <param name="state"></param>
public static void SendStateLog(SwapOrder swapOrder, InfoEnum.BusinessSwappingForCloudState state) public static void SendStateLog(SwapOrder swapOrder, InfoEnum.BusinessSwappingForCloudState state)
{ {
ChannelStatusReporting channelStatusReporting = new() StationChnRunStatus stationChnRunStatus = new()
{ {
}; };
CloudClientMgr.CloudClient?.SendChannelStatusReporting(channelStatusReporting, CloudClientMgr.CloudClient?.SendChannelStatusReporting(stationChnRunStatus,
global::System.TimeSpan.FromSeconds(TimeSpan)); global::System.TimeSpan.FromSeconds(TimeSpan));
return; return;
} }

@ -194,7 +194,7 @@ public class CarPrepareState : IState
BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>( BaseEnumExtensions.GetEnumByCode<StationConstant.StationModel>(
StaticStationInfo.StationModel)) StaticStationInfo.StationModel))
{ {
VehicleCertificationResp? vehicleCertificationResp = CarAuthRes? vehicleCertificationResp =
CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder); CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder);
if (vehicleCertificationResp == null || vehicleCertificationResp.re != 0) if (vehicleCertificationResp == null || vehicleCertificationResp.re != 0)

@ -57,6 +57,8 @@
<Compile Remove="FireControl\Msg\ReadMsg.cs" /> <Compile Remove="FireControl\Msg\ReadMsg.cs" />
<Compile Remove="Cloud\Client\MyTask\UpBatDataInfoTask.cs" /> <Compile Remove="Cloud\Client\MyTask\UpBatDataInfoTask.cs" />
<Compile Remove="Cloud\Msg\Host\Req\ChargerDataReport.cs" /> <Compile Remove="Cloud\Msg\Host\Req\ChargerDataReport.cs" />
<Compile Remove="Cloud\Msg\Host\Req\EndLogMessage.cs" />
<Compile Remove="Cloud\Msg\Cloud\Resp\EndLogMessageResp.cs" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -224,7 +224,7 @@ public class FireControlController
/// 获取读取到的信息 /// 获取读取到的信息
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet("GetSubzone2")] [HttpGet("GetSubzone6")]
public Result<Subzone6> GetSubzone6() public Result<Subzone6> GetSubzone6()
{ {
return Result<Subzone6>.Success(FireControlMgr.Subzone6); return Result<Subzone6>.Success(FireControlMgr.Subzone6);
@ -244,7 +244,7 @@ public class FireControlController
/// 获取读取到的信息 /// 获取读取到的信息
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet("GetSubzone2")] [HttpGet("GetSubzone8")]
public Result<Subzone8> GetSubzone8() public Result<Subzone8> GetSubzone8()
{ {
return Result<Subzone8>.Success(FireControlMgr.Subzone8); return Result<Subzone8>.Success(FireControlMgr.Subzone8);

@ -44,9 +44,9 @@ public class GenController : ControllerBase
} }
[HttpGet("CloudTestVelCheck")] [HttpGet("CloudTestVelCheck")]
public Result<VehicleCertificationResp> CloudTestVelCheck() public Result<CarAuthRes> CloudTestVelCheck()
{ {
VehicleCertificationResp vehicleCertificationResp = CloudApi.VehicleCheck(new RfidReadModel() CarAuthRes carAuthRes = CloudApi.VehicleCheck(new RfidReadModel()
{ {
//VelMac = "111", //VelMac = "111",
VelNo = "晋C03733D", VelNo = "晋C03733D",
@ -55,11 +55,11 @@ public class GenController : ControllerBase
{ {
VehicleEnterTime = DateTime.Now VehicleEnterTime = DateTime.Now
}); });
return Result<VehicleCertificationResp>.Success(vehicleCertificationResp); return Result<CarAuthRes>.Success(carAuthRes);
} }
[HttpGet("CloudTestUploadSwapOrder")] [HttpGet("CloudTestUploadSwapOrder")]
public Result<VehicleCertificationResp> CloudTestUploadSwapOrder() public Result<CarAuthRes> CloudTestUploadSwapOrder()
{ {
var uploadSwapOrder = CloudApi.UploadSwapOrder(new SwapOrder() var uploadSwapOrder = CloudApi.UploadSwapOrder(new SwapOrder()
{ {
@ -80,12 +80,12 @@ public class GenController : ControllerBase
{ {
}); });
return Result<VehicleCertificationResp>.Success(); return Result<CarAuthRes>.Success();
} }
[HttpGet("CloudTestUploadChargeOrder")] [HttpGet("CloudTestUploadChargeOrder")]
public Result<VehicleCertificationResp> CloudTestUploadChargeOrder() public Result<CarAuthRes> CloudTestUploadChargeOrder()
{ {
List<ChargeOrder> chargeOrders = new List<ChargeOrder>() List<ChargeOrder> chargeOrders = new List<ChargeOrder>()
{ {
@ -104,7 +104,7 @@ public class GenController : ControllerBase
}; };
CloudClientMgr.CloudClient?.PublishChargeOrder(chargeOrders, 1); CloudClientMgr.CloudClient?.PublishChargeOrder(chargeOrders, 1);
return Result<VehicleCertificationResp>.Success(); return Result<CarAuthRes>.Success();
} }

@ -17,7 +17,7 @@
"applicationUrl": "http://localhost:5034", "applicationUrl": "http://localhost:5034",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_ENVIRONMENT": "Development",
"profiles_active": "dev" "profiles_active": "prod"
} }
}, },
"IIS Express": { "IIS Express": {
@ -27,7 +27,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_ENVIRONMENT": "Development",
"applicationUrl": "http://0.0.0.0:5034", "applicationUrl": "http://0.0.0.0:5034",
"profiles_active": "dev" "profiles_active": "prod"
} }
} }
} }

Loading…
Cancel
Save