修改导出模板、config增加计费单价、换电订单增加计费字段、换电订单新增sql

master
tq 2 months ago
parent 3bb74c71f5
commit f7dd230783

@ -127,5 +127,20 @@
/// 换电电池
/// </summary>
public List<SwapOrderBatteryReq> batteryList { get; set; }
/// <summary>
/// 电费
/// </summary>
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
public int? AppendTotalFee { get; set; }
/// <summary>
/// 总费用(所有的总费用)
/// </summary>
public int? TotalFee { get; set; }
}
}

@ -135,5 +135,20 @@ namespace Entity.Api.Req
/// 换电电池
/// </summary>
public List<UpdateSwapOrderBatteryReq> batteryList { get; set; }
/// <summary>
/// 电费
/// </summary>
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
public int? AppendTotalFee { get; set; }
/// <summary>
/// 总费用(所有的总费用)
/// </summary>
public int? TotalFee { get; set; }
}
}

@ -43,4 +43,20 @@ public class StationConfigReq
/// 换电模式 0: 读取rdid 1:手动填写车辆vin
/// </summary>
public int VehicleManually { get; set; }
/// <summary>
/// 服务费
/// </summary>
public int ServiceTotalFee { get; set; }
/// <summary>
/// 电费
/// </summary>
public int ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
public int AppendTotalFee { get; set; }
}

@ -49,4 +49,20 @@ public class StationConfigResp
/// 换电模式 0: 读取rdid 1:手动填写车辆vin
/// </summary>
public int VehicleManually { get; set; }
/// <summary>
/// 服务费
/// </summary>
public int? ServiceTotalFee { get; set; }
/// <summary>
/// 电费
/// </summary>
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
public int? AppendTotalFee { get; set; }
}

@ -144,5 +144,35 @@ namespace Entity.Api.Resp
/// 换电小步
/// </summary>
public List<SwapOrderStepResp> StepList { get; set; }
/// <summary>
/// Desc:公司
/// Default:
/// Nullable:True
/// </summary>
public string? Company {get;set;}
/// <summary>
/// Desc:部门
/// Default:
/// Nullable:True
/// </summary>
public string? Departments {get;set;}
/// <summary>
/// 电费
/// </summary>
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
public int? AppendTotalFee { get; set; }
/// <summary>
/// 总费用(所有的总费用)
/// </summary>
public int? TotalFee { get; set; }
}
}

@ -190,6 +190,12 @@ public class StationParamConst
//选包策略换电Soc
public static readonly string SwapSoc = "Station.SwapSoc";
// 换电服务费
public static readonly string ServiceTotalFee = "Station.ServiceTotalFee";
// 电费
public static readonly string ElectricityTotalFee = "Station.ElectricityTotalFee";
// 附加费
public static readonly string AppendTotalFee = "Station.AppendTotalFee";
//充电soc
public static readonly string ChargeSoc = "Station.ChargeSoc";

@ -124,5 +124,24 @@ namespace Entity.DbModel.Station
/// </summary>
[SugarColumn(ColumnName = "swap_way")]
public int? SwapWay { get; set; }
/// <summary>
/// 电费(单位分)
/// </summary>
[SugarColumn(ColumnName = "electricity_total_fee")]
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费(单位分)
/// </summary>
[SugarColumn(ColumnName = "append_total_fee")]
public int? AppendTotalFee { get; set; }
/// <summary>
/// 总费用(所有的总费用-单位分)
/// </summary>
[SugarColumn(ColumnName = "total_fee")]
public int? TotalFee { get; set; }
}
}

@ -0,0 +1,23 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
/// <summary>
/// 充电量统计导出
/// </summary>
[ExcelExporter(Name = "充电量统计", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeCountDto
{
/// <summary>
/// 时间
/// </summary>
[ExporterHeader(DisplayName = "时间", IsBold = true)]
public string? Time { get; set; }
/// <summary>
/// 充电度数
/// </summary>
[ExporterHeader(DisplayName = "用电量/kWh", IsBold = true)]
public decimal? ChargeCount { get; set; }
}

@ -0,0 +1,20 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "CHARGE STATISTICS", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeCountDto2
{
/// <summary>
/// 时间
/// </summary>
[ExporterHeader(DisplayName = "TIME", IsBold = true)]
public string? Time { get; set; }
/// <summary>
/// 充电度数
/// </summary>
[ExporterHeader(DisplayName = "ELECTRICITY CONSUMPTION/kWh", IsBold = true)]
public decimal? ChargeCount { get; set; }
}

@ -0,0 +1,35 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "充电机已处理报警日志", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeEquipAlarmProcessRecordDto
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } = "2号站";
[ExporterHeader(DisplayName = "充电机编号", IsBold = true)]
public string EquipCode { get; set; }
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "报警名称", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "报警开始时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
[ExporterHeader(DisplayName = "报警结束时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? ProcessTime { get; set; }
}

@ -0,0 +1,35 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "CHARGER HAS PROCESSED ALARM LOG", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeEquipAlarmProcessRecordDto2
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; } = "STATION 2";
[ExporterHeader(DisplayName = "CHARGER NUMBER", IsBold = true)]
public string EquipCode { get; set; }
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "ALARM NAME", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "ALARM START TIME", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
[ExporterHeader(DisplayName = "ALARM END TIME", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? ProcessTime { get; set; }
}

@ -0,0 +1,33 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "充电机未处理报警日志", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeEquipAlarmRecordDto
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } = "2号站";
[ExporterHeader(DisplayName = "充电机编号", IsBold = true)]
public string EquipCode { get; set; }
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "报警名称", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "报警开始时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
}

@ -0,0 +1,32 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "THE CHARGER DID NOT PROCESS THE ALARM LOG", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeEquipAlarmRecordDto2
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; } = "STATION 2";
[ExporterHeader(DisplayName = "CHARGER NUMBER", IsBold = true)]
public string EquipCode { get; set; }
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "ALARM NAME", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "ALARM START TIME", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
}

@ -6,123 +6,38 @@ namespace Entity.Dto;
[ExcelExporter(Name = "充电订单", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeOrderDto
{
[ExporterHeader(DisplayName = "换电站名称", IsBold = true)]
public string stationName { get; set; } = "2号站";
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "订单编号", IsBold = true)]
[ExporterHeader(DisplayName = "充电流水号", IsBold = true)]
public string Sn { get; set; }
/// <summary>
/// Desc:电池编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池编号", IsBold = true)]
public string BatteryNo { get; set; }
/// <summary>
/// Desc:启动报文状态;0-初始化1-启动成功
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "启动报文状态", IsBold = true)]
public string CmdStatusDisplay
{
get
{
return CmdStatus switch
{
0 => "初始化",
1 => "启动成功",
_ => "未知"
};
}
}
/// <summary>
/// Desc:启动报文状态;0-初始化1-启动成功
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? CmdStatus { get; set; }
/// <summary>
/// Desc:充电机编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电机编号", IsBold = true)]
[ExporterHeader(DisplayName = "充电桩编号", IsBold = true)]
public string ChargerNo { get; set; }
/// <summary>
/// Desc:充电枪编号
/// Desc:电池编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电枪编号", IsBold = true)]
public string ChargerGunNo { get; set; }
/// <summary>
/// 0站内充电 1站外充电
/// </summary>
[ExporterHeader(DisplayName = "充电位置", IsBold = true)]
public string ChargeModeDisplay
{
get
{
return ChargeMode switch
{
0 => "站内充电",
1 => "站外充电",
_ => "未知"
};
}
}
/// <summary>
/// 0站内充电 1站外充电
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int ChargeMode { get; set; }
/// <summary>
/// 1站控启动 2本地启动
/// </summary>
[ExporterHeader(DisplayName = "启动方式", IsBold = true)]
public string StartModeDisplay
{
get
{
return StartMode switch
{
1 => "站控启动",
2 => "本地启动",
_ => "未知"
};
}
}
/// <summary>
/// 1站控启动 2本地启动
/// </summary>
[ExporterHeader(IsIgnore = true)]
[ExporterHeader(DisplayName = "电池编号", IsBold = true)]
public int StartMode { get; set; }
public string BatteryNo { get; set; }
/// <summary>
/// 充电开始时间
/// </summary>
[ExporterHeader(DisplayName = "充电开始时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
[ExporterHeader(DisplayName = "开始时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
@ -131,27 +46,10 @@ public class ChargeOrderDto
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电结束时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
[ExporterHeader(DisplayName = "结束时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? EndTime { get; set; }
/// <summary>
/// Desc:充电开始soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电开始soc", IsBold = true)]
public int? StartSoc { get; set; }
/// <summary>
/// Desc:充电结束soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电结束soc", IsBold = true)]
public int? StopSoc { get; set; }
/// <summary>
/// Desc:充电时长
@ -159,53 +57,45 @@ public class ChargeOrderDto
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电时长", IsBold = true)]
public int ChargeTimeCount { get; set; }
/// <summary>
/// Desc:充电电量
/// Desc:充电开始soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电电量", IsBold = true)]
[ExporterHeader(DisplayName = "充电开始soc", IsBold = true)]
public decimal? ElecCount { get; set; }
public int? StartSoc { get; set; }
/// <summary>
/// Desc:充电开始交流表电量
/// Desc:充电结束soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电开始交流表电量", IsBold = true)]
[ExporterHeader(DisplayName = "充电结束soc", IsBold = true)]
public int? StopSoc { get; set; }
public decimal? StartAcElec { get; set; }
/// <summary>
/// Desc:充电结束交流表电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电结束交流表电量", IsBold = true)]
public decimal? StopAcElec { get; set; }
/// <summary>
/// Desc:充电开始流表电量
/// Desc:充电开始交流表电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电开始直流表电量", IsBold = true)]
[ExporterHeader(DisplayName = "开始交流表电量/kWh", IsBold = true)]
public decimal? StartAcElec1 { get; set; }
public decimal? StartDcElec { get; set; }
[ExporterHeader(DisplayName = "结束交流表电量/kWh", IsBold = true)]
public decimal? StopAcElec1 { get; set; }
/// <summary>
/// Desc:充电结束直流表电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "充电结束直流表电量", IsBold = true)]
[ExporterHeader(DisplayName = "开始直流表电量/kWh", IsBold = true)]
public decimal? StartDcElec1 { get; set; }
public decimal? StopDcElec { get; set; }
[ExporterHeader(DisplayName = "结束直流表电量/kWh", IsBold = true)]
public decimal? StopDcElec1 { get; set; }
/// <summary>
/// Desc:停止原因;0满电自动停止1-人工停止
@ -233,189 +123,4 @@ public class ChargeOrderDto
[ExporterHeader(IsIgnore = true)]
public int? StopReason { get; set; }
/// <summary>
/// Desc:尖时段电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "尖时段电量", IsBold = true)]
public decimal? SharpElecCount { get; set; }
/// <summary>
/// Desc:峰时段电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "峰时段电量", IsBold = true)]
public decimal? PeakElecCount { get; set; }
/// <summary>
/// Desc:平时段电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "平时段电量", IsBold = true)]
public decimal? FlatElecCount { get; set; }
/// <summary>
/// Desc:谷时段电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "谷时段电量", IsBold = true)]
public decimal? ValleyElecCount { get; set; }
/// <summary>
/// Desc:尖时段交流电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "尖时段交流电量", IsBold = true)]
public decimal? ACSharpElecCount { get; set; }
/// <summary>
/// Desc:峰时段交流电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "峰时段交流电量", IsBold = true)]
public decimal? ACPeakElecCount { get; set; }
/// <summary>
/// Desc:平时段交流电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "平时段交流电量", IsBold = true)]
public decimal? ACFlatElecCount { get; set; }
/// <summary>
/// Desc:谷时段交流电量
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "谷时段交流电量", IsBold = true)]
public decimal? ACValleyElecCount { get; set; }
/// <summary>
/// Desc:电价版本号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电价版本号", IsBold = true)]
public string ElecPriceModelVersion { get; set; }
/// <summary>
/// Desc:换电订单编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电订单编号", IsBold = true)]
public string SwapOrderSn { get; set; }
/// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "上传云平台状态", IsBold = true)]
public string CloudReportStatusDisplay
{
get
{
return CloudReportStatus switch
{
0 => "未上传",
1 => "已上传",
_ => "未知"
};
}
}
[ExporterHeader(IsIgnore = true)]
public int? CloudReportStatus { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "创建人", IsBold = true)]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "创建时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "更新人", IsBold = true,Width = 25)]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "更新时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// 云平台充电订单
/// </summary>
[ExporterHeader(DisplayName = "云平台充电订单", IsBold = true)]
public string? CloudChargeOrder { get; set; }
/// <summary>
/// Desc:是否可以上传云平台
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "是否可以上传云平台", IsBold = true)]
public string CanUploadDisplay
{
get
{
return CanUpload switch
{
0 => "不可用",
1 => "可以",
_ => "未知"
};
}
}
/// <summary>
/// Desc:是否可以上传云平台
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? CanUpload { get; set; }
}

@ -9,65 +9,18 @@ namespace Entity.Dto;
[ExcelExporter(Name = "Charge Orders", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeOrderDto2
{
[ExporterHeader(DisplayName = "NAME OF CHANGING STATION", IsBold = true)]
public string stationName { get; set; } = "STATION 2";
[ExporterHeader(DisplayName = "Order Number", IsBold = true)]
public string Sn { get; set; }
[ExporterHeader(DisplayName = "Battery Number", IsBold = true)]
public string BatteryNo { get; set; }
[ExporterHeader(DisplayName = "Command Status", IsBold = true)]
public string CmdStatusDisplay
{
get
{
return CmdStatus switch
{
0 => "Initialized",
1 => "Started Successfully",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? CmdStatus { get; set; }
[ExporterHeader(DisplayName = "Charger Number", IsBold = true)]
public string ChargerNo { get; set; }
[ExporterHeader(DisplayName = "Charger Gun Number", IsBold = true)]
public string ChargerGunNo { get; set; }
[ExporterHeader(DisplayName = "Charging Location", IsBold = true)]
public string ChargeModeDisplay
{
get
{
return ChargeMode switch
{
0 => "In-station Charging",
1 => "Out-of-station Charging",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int ChargeMode { get; set; }
[ExporterHeader(DisplayName = "Start Mode", IsBold = true)]
public string StartModeDisplay
{
get
{
return StartMode switch
{
1 => "Station-controlled Start",
2 => "Local Start",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int StartMode { get; set; }
[ExporterHeader(DisplayName = "Start Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
@ -77,29 +30,29 @@ public class ChargeOrderDto2
AutoCenterColumn = true)]
public DateTime? EndTime { get; set; }
[ExporterHeader(DisplayName = "Charge Duration", IsBold = true)]
public int ChargeTimeCount { get; set; }
[ExporterHeader(DisplayName = "Start SOC", IsBold = true)]
public int? StartSoc { get; set; }
[ExporterHeader(DisplayName = "End SOC", IsBold = true)]
public int? StopSoc { get; set; }
[ExporterHeader(DisplayName = "Charge Duration", IsBold = true)]
public int ChargeTimeCount { get; set; }
[ExporterHeader(DisplayName = "Charge Quantity", IsBold = true)]
public decimal? ElecCount { get; set; }
[ExporterHeader(DisplayName = "START ALTERNATING METER POWER/kWh", IsBold = true)]
public decimal? StartAcElec1 { get; set; }
[ExporterHeader(DisplayName = "END THE AC METER BATTERY/kWh", IsBold = true)]
public decimal? StopAcElec1 { get; set; }
[ExporterHeader(DisplayName = "Start AC Quantity", IsBold = true)]
public decimal? StartAcElec { get; set; }
[ExporterHeader(DisplayName = "START DC METER POWER/kWh", IsBold = true)]
public decimal? StartDcElec1 { get; set; }
[ExporterHeader(DisplayName = "End AC Quantity", IsBold = true)]
public decimal? StopAcElec { get; set; }
[ExporterHeader(DisplayName = "END DC METER POWER/kWh", IsBold = true)]
public decimal? StopDcElec1 { get; set; }
[ExporterHeader(DisplayName = "Start DC Quantity", IsBold = true)]
public decimal? StartDcElec { get; set; }
[ExporterHeader(DisplayName = "End DC Quantity", IsBold = true)]
public decimal? StopDcElec { get; set; }
[ExporterHeader(DisplayName = "Stop Reason", IsBold = true)]
public string StopReasonDisplay
@ -117,82 +70,4 @@ public class ChargeOrderDto2
[ExporterHeader(IsIgnore = true)] public int? StopReason { get; set; }
[ExporterHeader(DisplayName = "Sharp Period Quantity", IsBold = true)]
public decimal? SharpElecCount { get; set; }
[ExporterHeader(DisplayName = "Peak Period Quantity", IsBold = true)]
public decimal? PeakElecCount { get; set; }
[ExporterHeader(DisplayName = "Flat Period Quantity", IsBold = true)]
public decimal? FlatElecCount { get; set; }
[ExporterHeader(DisplayName = "Valley Period Quantity", IsBold = true)]
public decimal? ValleyElecCount { get; set; }
[ExporterHeader(DisplayName = "Sharp Period AC Quantity", IsBold = true)]
public decimal? ACSharpElecCount { get; set; }
[ExporterHeader(DisplayName = "Peak Period AC Quantity", IsBold = true)]
public decimal? ACPeakElecCount { get; set; }
[ExporterHeader(DisplayName = "Flat Period AC Quantity", IsBold = true)]
public decimal? ACFlatElecCount { get; set; }
[ExporterHeader(DisplayName = "Valley Period AC Quantity", IsBold = true)]
public decimal? ACValleyElecCount { get; set; }
[ExporterHeader(DisplayName = "Electricity Price Version", IsBold = true)]
public string ElecPriceModelVersion { get; set; }
[ExporterHeader(DisplayName = "Swap Order Number", IsBold = true)]
public string SwapOrderSn { get; set; }
[ExporterHeader(DisplayName = "Cloud Report Status", IsBold = true)]
public string CloudReportStatusDisplay
{
get
{
return CloudReportStatus switch
{
0 => "Not Uploaded",
1 => "Uploaded",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? CloudReportStatus { get; set; }
[ExporterHeader(DisplayName = "Created By", IsBold = true)]
public string CreatedBy { get; set; }
[ExporterHeader(DisplayName = "Created Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? CreatedTime { get; set; }
[ExporterHeader(DisplayName = "Updated By", IsBold = true, Width = 25)]
public string UpdatedBy { get; set; }
[ExporterHeader(DisplayName = "Updated Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? UpdatedTime { get; set; }
[ExporterHeader(DisplayName = "Cloud Charge Order", IsBold = true)]
public string? CloudChargeOrder { get; set; }
[ExporterHeader(DisplayName = "Can Upload to Cloud", IsBold = true)]
public string CanUploadDisplay
{
get
{
return CanUpload switch
{
0 => "Not Available",
1 => "Available",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? CanUpload { get; set; }
}

@ -0,0 +1,32 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "Plc已处理报警日志", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class PlcEquipAlarmProcessRecordDto
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } = "2号站";
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "报警名称", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "报警开始时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
[ExporterHeader(DisplayName = "报警结束时间", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? ProcessTime { get; set; }
}

@ -0,0 +1,31 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "PLC HAS PROCESSED ALARM LOG", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class PlcEquipAlarmProcessRecordDto2
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; } = "STATION 2";
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "ALARM NAME", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "ALARM START TIME", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
[ExporterHeader(DisplayName = "ALARM END TIME", IsBold = true,Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? ProcessTime { get; set; }
}

@ -0,0 +1,28 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "PLc未处理报警日志", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class PlcEquipAlarmRecordDto
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } = "2号站";
/// <summary>
/// Desc:报警描述
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "报警名称", IsBold = true)]
public string ErrorMsg { get; set; }
/// <summary>
/// 报警开始时间
/// </summary>
[ExporterHeader(DisplayName = "报警开始时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
}

@ -0,0 +1,19 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "PLC DID NOT PROCESS ALARM LOG", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class PlcEquipAlarmRecordDto2
{
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; }= "STATION 2";
[ExporterHeader(DisplayName = "Alarm Description", IsBold = true)]
public string ErrorMsg { get; set; }
[ExporterHeader(DisplayName = "ALARM START TIME", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? StartTime { get; set; }
}

@ -0,0 +1,71 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
/// <summary>
/// 换电失败订单导出
/// </summary>
[ExcelExporter(Name = "2号站换电失败记录", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class SwapLoseOrderDto
{
[ExporterHeader(IsIgnore = true)]
public string Sn { get; set; }
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } = "2号站";
[ExporterHeader(DisplayName = "开始时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? SwapBeginTime { get; set; }
[ExporterHeader(DisplayName = "车辆vin码", IsBold = true)]
public string VehicleVin { get; set; }
/// <summary>
/// Desc:车牌号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "车牌号", IsBold = true)]
public string VehicleNo { get; set; }
/// <summary>
/// Desc:取电池仓位号 满电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "取电池仓位号", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// Desc:放电池仓位号 亏电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "存电池仓位号", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
/// <summary>
/// Desc:换电结束时间
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "失败时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? SwapEndTime { get; set; }
/// <summary>
/// Desc:失败原因
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "失败原因", IsBold = true)]
public string FailReason { get; set; }
}

@ -0,0 +1,37 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
[ExcelExporter(Name = "POWER FAILURE RECORD OF STATION 2", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class SwapLoseOrderDto2
{
[ExporterHeader(IsIgnore = true)]
public string Sn { get; set; }
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; }= "STATION 2";
[ExporterHeader(DisplayName = "Swap Begin Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? SwapBeginTime { get; set; }
[ExporterHeader(DisplayName = "Vehicle VIN", IsBold = true)]
public string VehicleVin { get; set; }
[ExporterHeader(DisplayName = "Vehicle Number", IsBold = true)]
public string VehicleNo { get; set; }
[ExporterHeader(DisplayName = "Up Battery Bin Number", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
[ExporterHeader(DisplayName = "Down Battery Bin Number", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
[ExporterHeader(DisplayName = "Swap End Time", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? SwapEndTime { get; set; }
[ExporterHeader(DisplayName = "Failure Reason", IsBold = true)]
public string FailReason { get; set; }
}

@ -14,9 +14,22 @@ public class SwapOrderDto
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; }
public string StationNumber { get; set; }= "2号站";
[ExporterHeader(DisplayName = "创建时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:车辆vin码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "车辆vin码", IsBold = true)]
public string VehicleVin { get; set; }
/// <summary>
/// Desc:车牌号
/// Default:
@ -26,36 +39,46 @@ public class SwapOrderDto
public string VehicleNo { get; set; }
/// <summary>
/// Desc:车辆mac
/// Desc:公司
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "车辆mac", IsBold = true)]
public string VehicleMac { get; set; }
[ExporterHeader(DisplayName = "所属公司", IsBold = true)]
public string? Company {get;set;}
/// <summary>
/// Desc: 公司
/// Desc:部门
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "公司", IsBold = true)]
public string Firm { get; set; }
[ExporterHeader(DisplayName = "所属部门", IsBold = true)]
public string? Departments {get;set;}
/// <summary>
/// Desc: 部门
/// Default:
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "部门", IsBold = true)]
public string Department { get; set; }
[ExporterHeader(DisplayName = "换电模式", IsBold = true)]
public string SwapWayDisplay
{
get
{
return SwapWay switch
{
1 => "自动换电",
2 => "手动换电",
_ => "未知"
};
}
}
/// <summary>
/// Desc:车辆vin码
/// Default:
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "车辆vin码", IsBold = true)]
public string VehicleVin { get; set; }
[ExporterHeader(IsIgnore = true)]
public int? SwapWay { get; set; }
///// <summary>
///// Desc:车辆进场时间
@ -80,7 +103,7 @@ public class SwapOrderDto
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电开始时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
[ExporterHeader(DisplayName = "开始时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? SwapBeginTime { get; set; }
@ -89,7 +112,7 @@ public class SwapOrderDto
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电结束时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
[ExporterHeader(DisplayName = "结束时间", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? SwapEndTime { get; set; }
@ -113,140 +136,78 @@ public class SwapOrderDto
/// <summary>
/// Desc:换电结果;0-未知1-成功2-失败
/// Default:0
/// Desc:取电池仓位号 满电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电结果", IsBold = true)]
public string SwapResultDisplay
{
get
{
return SwapResult switch
{
0 => "未知",
1 => "成功",
2 => "失败",
_ => "未知"
};
}
}
[ExporterHeader(DisplayName = "换电仓位(取)", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// Desc:换电结果;0-未知1-成功2-失败
/// Default:0
/// Nullable:True
/// </summary>
// [ExporterHeader(DisplayName = "换电结果", IsBold = true)]
[ExporterHeader(IsIgnore = true)]
public int? SwapResult { get; set; }
/// <summary>
/// Desc:失败原因
/// Desc:满电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "失败原因", IsBold = true)]
public string FailReason { get; set; }
[ExporterHeader(DisplayName = "电池编号(取)", IsBold = true)]
public string? UpBatteryNo { get; set; }
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电类型", IsBold = true)]
public string SwapWayDisplay
{
get
{
return SwapWay switch
{
1 => "自动换电",
2 => "手动换电",
_ => "未知"
};
}
}
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// 满电包电量
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? SwapWay { get; set; }
[ExporterHeader(DisplayName = "换池电量kWh", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
/// <summary>
/// Desc:亏电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池编号(存)", IsBold = true)]
public string? DownBatteryNo { get; set; }
/// <summary>
/// Desc:电包soc
/// Desc:满电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "soc", IsBold = true)]
[ExporterHeader(DisplayName = "soc", IsBold = true)]
public decimal? UpBatterySoc { get; set; }
public decimal? DownBatterySoc { get; set; }
/// <summary>
/// Desc:放电池仓位号 亏电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "放电池仓位号", IsBold = true)]
[ExporterHeader(DisplayName = "换电仓位(存)", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
/// <summary>
/// Desc:取电池仓位号 满电包仓号
/// Desc:亏电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "取电池仓位号", IsBold = true)]
[ExporterHeader(DisplayName = "电池编号(存)", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
public string? DownBatteryNo { get; set; }
/// <summary>
/// Desc:满电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包编码(取)", IsBold = true)]
public string? UpBatteryNo { get; set; }
/// <summary>
/// Desc:满电包soc
/// Default:
/// Nullable:True
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "满电包soc", IsBold = true)]
public decimal? UpBatterySoc { get; set; }
[ExporterHeader(DisplayName = "换池电量kwh", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
/// <summary>
/// 满电包电量
/// Desc:亏电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池电量(取)", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
[ExporterHeader(DisplayName = "soc", IsBold = true)]
/// <summary>
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "电池电量(存)", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
public decimal? DownBatterySoc { get; set; }
/// <summary>
/// 电量差
/// </summary>
[ExporterHeader(DisplayName = "电池差值", IsBold = true)]
[ExporterHeader(DisplayName = "电量差kwh", IsBold = true)]
public string ElectricQuantity { get; set; }
@ -261,77 +222,20 @@ public class SwapOrderDto
/// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "上传云平台状态", IsBold = true)]
public string CloudReportStatusDisplay
{
get
{
return CloudReportStatus switch
{
0 => "未上传",
1 => "已上传",
_ => "未上传"
};
}
}
// [ExporterHeader(DisplayName = "上传云平台状态", IsBold = true)]
[ExporterHeader(IsIgnore = true)] public int? CloudReportStatus { get; set; }
/// <summary>
/// 云平台订单号
/// </summary>
[ExporterHeader(DisplayName = "云平台订单号", IsBold = true)]
public string? CloudSn { get; set; }
/// <summary>
/// Desc:亏电包真实soc
/// Default:
/// Nullable:True
/// 电费
/// </summary>
[ExporterHeader(DisplayName = "亏电包真实soc", IsBold = true)]
public decimal? DownBatteryRealSoc { get; set; }
[ExporterHeader(DisplayName = "电费", IsBold = true)]
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// Desc:亏电包上次换电结算时soc
/// Default:
/// Nullable:True
/// 附加费
/// </summary>
[ExporterHeader(DisplayName = "亏电包上次换电结算时soc", IsBold = true)]
public decimal? DownBatteryLastSoc { get; set; }
[ExporterHeader(DisplayName = "附加费", IsBold = true)]
public int? AppendTotalFee { get; set; }
/// <summary>
/// Desc:满电包真实soc
/// Default:
/// Nullable:True
/// 总费用(所有的总费用)
/// </summary>
[ExporterHeader(DisplayName = "满电包真实soc", IsBold = true)]
public decimal? UpBatteryRealSoc { get; set; }
[ExporterHeader(DisplayName = "总费用(所有的总费用)", IsBold = true)]
public int? TotalFee { get; set; }
}

@ -9,6 +9,17 @@ namespace Entity.Dto;
[ExcelExporter(Name = "Swap Orders", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class SwapOrderDto2
{
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "STATION NUMBER", IsBold = true)]
public string StationNumber { get; set; }= "STATION 2";
[ExporterHeader(DisplayName = "CREATION TIME", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? CreatedTime { get; set; }
[ExporterHeader(DisplayName = "Order Number", IsBold = true)]
public string Sn { get; set; }
@ -36,44 +47,6 @@ public class SwapOrderDto2
[ExporterHeader(DisplayName = "Swap End Time", Width = 30, Format = "yyyy-MM-dd HH:mm:ss", AutoCenterColumn = true)]
public DateTime? SwapEndTime { get; set; }
[ExporterHeader(DisplayName = "Swap Result", IsBold = true)]
public string SwapResultDisplay
{
get
{
return SwapResult switch
{
0 => "Unknown",
1 => "Success",
2 => "Failure",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? SwapResult { get; set; }
[ExporterHeader(DisplayName = "Failure Reason", IsBold = true)]
public string FailReason { get; set; }
[ExporterHeader(DisplayName = "Cloud Report Status", IsBold = true)]
public string CloudReportStatusDisplay
{
get
{
return CloudReportStatus switch
{
0 => "Not Uploaded",
1 => "Uploaded",
_ => "Not Uploaded"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? CloudReportStatus { get; set; }
[ExporterHeader(DisplayName = "Cloud Order Number", IsBold = true)]
public string? CloudSn { get; set; }
[ExporterHeader(DisplayName = "Swap Type", IsBold = true)]
public string SwapWayDisplay
@ -94,12 +67,6 @@ public class SwapOrderDto2
[ExporterHeader(DisplayName = "Down Battery SOC", IsBold = true)]
public decimal? DownBatterySoc { get; set; }
[ExporterHeader(DisplayName = "Down Battery Real SOC", IsBold = true)]
public decimal? DownBatteryRealSoc { get; set; }
[ExporterHeader(DisplayName = "Down Battery Last SOC", IsBold = true)]
public decimal? DownBatteryLastSoc { get; set; }
[ExporterHeader(DisplayName = "Down Battery Number", IsBold = true)]
public string? DownBatteryNo { get; set; }
@ -109,21 +76,12 @@ public class SwapOrderDto2
[ExporterHeader(DisplayName = "Up Battery SOC", IsBold = true)]
public decimal? UpBatterySoc { get; set; }
[ExporterHeader(DisplayName = "Up Battery Real SOC", IsBold = true)]
public decimal? UpBatteryRealSoc { get; set; }
[ExporterHeader(DisplayName = "Down Battery Bin Number", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
[ExporterHeader(DisplayName = "Up Battery Bin Number", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// 站号
/// </summary>
[ExporterHeader(DisplayName = "Station Number", IsBold = true)]
public string StationNumber { get; set; }
/// <summary>
/// 电量
/// </summary>
@ -132,11 +90,45 @@ public class SwapOrderDto2
/// <summary>
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "亏电包电量", IsBold = true)]
[ExporterHeader(DisplayName = "LOSS OF POWER PACKAGE", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
/// <summary>
/// 满电包电量
/// </summary>
[ExporterHeader(DisplayName = "满电包电量", IsBold = true)]
[ExporterHeader(DisplayName = "FULL CHARGE PACK POWER", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
/// <summary>
/// Desc:公司
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "CORPORATION", IsBold = true)]
public string? Company {get;set;}
/// <summary>
/// Desc:部门
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "SECTION", IsBold = true)]
public string? Departments {get;set;}
/// <summary>
/// 电费
/// </summary>
[ExporterHeader(DisplayName = "ELECTRIC CHARGE", IsBold = true)]
public int? ElectricityTotalFee { get; set; }
/// <summary>
/// 附加费
/// </summary>
[ExporterHeader(DisplayName = "ADDITIONAL CHARGE", IsBold = true)]
public int? AppendTotalFee { get; set; }
/// <summary>
/// 总费用(所有的总费用)
/// </summary>
[ExporterHeader(DisplayName = "TOTAL COST", IsBold = true)]
public int? TotalFee { get; set; }
}

@ -315,5 +315,24 @@ public class StaticStationInfo
_sysConfigService.Set(key, value);
}
public static int ServiceTotalFee
{
get => int.Parse(Resolve(StationParamConst.ServiceTotalFee));
set => Set(StationParamConst.ServiceTotalFee, value);
}
public static int ElectricityTotalFee
{
get => int.Parse(Resolve(StationParamConst.ElectricityTotalFee));
set => Set(StationParamConst.ElectricityTotalFee, value);
}
public static int AppendTotalFee
{
get => int.Parse(Resolve(StationParamConst.AppendTotalFee));
set => Set(StationParamConst.AppendTotalFee, value);
}
#endregion
}

@ -84,6 +84,34 @@ public class ChargeOrderService : BaseServices<ChargeOrder>
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "充电订单.xlsx" };
}
}
public async Task<IActionResult> ExportElectricityChargerNoConsumption(ChargeCountReq req,string language)
{
// 查询订单
List<ChargeCountResp> resp = await GetElectricityConsumption(req, false);
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap<ChargeCountDto, ChargeCountResp>().ReverseMap();
});
IMapper mapper = config.CreateMapper();
if (language == "en")
{
List<ChargeCountDto> list2 = mapper.Map<List<ChargeCountDto>>(resp);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(list2);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_chargeCount.xlsx" };
}
else
{
List<ChargeCountDto> list = mapper.Map<List<ChargeCountDto>>(resp);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(list);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "充电量统计.xlsx" };
}
}
/// <summary>
/// 查询需要导出订单
/// </summary>

@ -151,6 +151,10 @@ namespace WebStarter.Controllers.BasicConfig
stationBaseRespResp.StationStatus = StaticStationInfo.StationStatus;
stationBaseRespResp.ChargeSoc = StaticStationInfo.ChargeSoc;
stationBaseRespResp.VehicleManually = StaticStationInfo.VehicleManually;
// 单价
stationBaseRespResp.ServiceTotalFee = StaticStationInfo.ServiceTotalFee;
stationBaseRespResp.ElectricityTotalFee = StaticStationInfo.ElectricityTotalFee;
stationBaseRespResp.AppendTotalFee = StaticStationInfo.AppendTotalFee;
return Result<StationConfigResp>.Success(stationBaseRespResp);
}
@ -172,6 +176,15 @@ namespace WebStarter.Controllers.BasicConfig
StaticStationInfo.ChargeSoc = input.ChargeSoc;
StaticStationInfo.VehicleManually = input.VehicleManually;
StaticStationInfo.ServiceTotalFee = input.ServiceTotalFee;
StaticStationInfo.ElectricityTotalFee = input.ElectricityTotalFee;
StaticStationInfo.AppendTotalFee = input.AppendTotalFee;
return Result<bool>.Success();
}

@ -1,5 +1,6 @@
using System.Linq.Expressions;
using AutoMapper;
using Common.Const;
using Entity.Api.Req;
using Entity.DbModel.Station;
using Entity.Dto;
@ -103,10 +104,53 @@ public class EquipAlarmRecordController : ControllerBase
{
cfg.CreateMap<EquipAlarmRecordDto, EquipAlarmRecord>().ReverseMap();
cfg.CreateMap<EquipAlarmRecordDto2, EquipAlarmRecord>().ReverseMap();
cfg.CreateMap<PlcEquipAlarmRecordDto, EquipAlarmRecord>().ReverseMap();
cfg.CreateMap<PlcEquipAlarmRecordDto2, EquipAlarmRecord>().ReverseMap();
cfg.CreateMap<ChargeEquipAlarmRecordDto, EquipAlarmRecord>().ReverseMap();
cfg.CreateMap<ChargeEquipAlarmRecordDto2, EquipAlarmRecord>().ReverseMap();
});
IMapper mapper = config.CreateMapper();
if (req.TypeCode==(int)EquipmentType.Plc)
{
if (language == "en")
{
List<PlcEquipAlarmRecordDto2> logExList2 = mapper.Map<List<PlcEquipAlarmRecordDto2>>(equipAlarmRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList2);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_Unhandled_Alarm_Logs.xlsx" };
}
else
{
List<PlcEquipAlarmRecordDto> logExList = mapper.Map<List<PlcEquipAlarmRecordDto>>(equipAlarmRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "未处理报警日志.xlsx" };
}
}
if (req.TypeCode==(int)EquipmentType.Charger)
{
if (language == "en")
{
List<ChargeEquipAlarmRecordDto2> logExList2 = mapper.Map<List<ChargeEquipAlarmRecordDto2>>(equipAlarmRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList2);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_Unhandled_Alarm_Logs.xlsx" };
}
else
{
List<ChargeEquipAlarmRecordDto> logExList = mapper.Map<List<ChargeEquipAlarmRecordDto>>(equipAlarmRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "未处理报警日志.xlsx" };
}
}
if (language == "en")
{
List<EquipAlarmRecordDto2> logExList2 = mapper.Map<List<EquipAlarmRecordDto2>>(equipAlarmRecords);
@ -198,10 +242,55 @@ public class EquipAlarmRecordController : ControllerBase
{
cfg.CreateMap<EquipAlarmProcessRecordDto, EquipAlarmProcessRecord>().ReverseMap();
cfg.CreateMap<EquipAlarmProcessRecordDto2, EquipAlarmProcessRecord>().ReverseMap();
cfg.CreateMap<PlcEquipAlarmProcessRecordDto, EquipAlarmProcessRecord>().ReverseMap();
cfg.CreateMap<PlcEquipAlarmProcessRecordDto2, EquipAlarmProcessRecord>().ReverseMap();
cfg.CreateMap<ChargeEquipAlarmProcessRecordDto, EquipAlarmProcessRecord>().ReverseMap();
cfg.CreateMap<ChargeEquipAlarmProcessRecordDto2, EquipAlarmProcessRecord>().ReverseMap();
});
IMapper mapper = config.CreateMapper();
if (req.TypeCode==(int)EquipmentType.Plc)
{
if (language == "en")
{
List<PlcEquipAlarmProcessRecordDto2> logExList2 = mapper.Map<List<PlcEquipAlarmProcessRecordDto2>>(equipAlarmProcessRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList2);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_Processed_Alarm_Logs.xlsx" };
}
else
{
List<PlcEquipAlarmProcessRecordDto> logExList = mapper.Map<List<PlcEquipAlarmProcessRecordDto>>(equipAlarmProcessRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "已处理报警日志.xlsx" };
}
}
if (req.TypeCode==(int)EquipmentType.Charger)
{
if (language == "en")
{
List<ChargeEquipAlarmProcessRecordDto2> logExList2 = mapper.Map<List<ChargeEquipAlarmProcessRecordDto2>>(equipAlarmProcessRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList2);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_Processed_Alarm_Logs.xlsx" };
}
else
{
List<ChargeEquipAlarmProcessRecordDto> logExList = mapper.Map<List<ChargeEquipAlarmProcessRecordDto>>(equipAlarmProcessRecords);
IExcelExporter excelExporter = new ExcelExporter();
var res = await excelExporter.ExportAsByteArray(logExList);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{ FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "已处理报警日志.xlsx" };
}
}
if (language == "en")
{
List<EquipAlarmProcessRecordDto2> logExList2 = mapper.Map<List<EquipAlarmProcessRecordDto2>>(equipAlarmProcessRecords);

@ -70,4 +70,18 @@ public class HomeController : ControllerBase
{
return Result<PageResult<ChargeCountResp>>.Success(await _chargeOrderService.GetElectricityConsumptionByChargerNo(req), "成功");
}
/// <summary>
/// 充电量导出
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("export")]
public async Task<IActionResult> ExportSwapOrder([FromBody] ChargeCountReq req)
{
// 获取请求头中的语言信息
var language = Request.Headers["Accept-Language"].ToString().ToLower();
return await _chargeOrderService.ExportElectricityChargerNoConsumption(req,language);
}
}

@ -30,15 +30,17 @@ public class SwapOrderController : ControllerBase
private readonly SwapOrderStepService swapOrderStepService;
private readonly SwapOrderReportCloudRepository swapOrderReportCloudRepository;
private readonly VehicleService vehicleService;
private readonly BaseVehicleRepository _baseVehicleRepository;
public SwapOrderController(SwapOrderService swapOrderService, SwapOrderBatteryService swapOrderBatteryService,
SwapOrderStepService swapOrderStepService,SwapOrderReportCloudRepository swapOrderReportCloudRepository)
SwapOrderStepService swapOrderStepService,SwapOrderReportCloudRepository swapOrderReportCloudRepository,BaseVehicleRepository baseVehicleRepository
)
{
this.swapOrderService = swapOrderService;
this.swapOrderBatteryService = swapOrderBatteryService;
this.swapOrderStepService = swapOrderStepService;
this.swapOrderReportCloudRepository = swapOrderReportCloudRepository;
_baseVehicleRepository = baseVehicleRepository;
}
/// <summary>
@ -58,8 +60,27 @@ public class SwapOrderController : ControllerBase
Log.Info($"查询换电订单 SwapOrderController start QueryPage swapOrderService.QuerySwapOrder req={req}");
var swapOrderResp = swapOrderService.QuerySwapOrder(req);
Log.Info($"查询换电订单 SwapOrderController end QueryPage swapOrderService.QuerySwapOrder req={req}");
PackageSwapOrder(swapOrderResp);
List<SwapOrderResp>? list = swapOrderResp.Rows;
List<string> vehicleNoList = list?.Select(resp => resp.VehicleNo).ToList() ?? new List<string>();
// 查询车辆的部门
List<BaseVehicle> vehicleList = await _baseVehicleRepository
.Queryable()
.In(vehicle => vehicle.VehicleNo, vehicleNoList)
.ToListAsync();
// 给换电订单赋值车的公司和部门
foreach (var swapOrder in list)
{
var matchingVehicle = vehicleList.FirstOrDefault(v => v.VehicleNo == swapOrder.VehicleNo);
if (matchingVehicle != null)
{
swapOrder.Company = matchingVehicle.Company;
swapOrder.Departments = matchingVehicle.Departments;
}
}
return Result<PageResult<SwapOrderResp>>.Success(swapOrderResp);
}
@ -363,15 +384,42 @@ public class SwapOrderController : ControllerBase
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap<SwapOrderBatteryResp, SwapOrderBattery>().ReverseMap();
cfg.CreateMap<SwapOrderDto, SwapOrder>().ReverseMap();
cfg.CreateMap<SwapOrderDto2, SwapOrder>().ReverseMap();
cfg.CreateMap<SwapOrderDto, SwapOrderResp>().ReverseMap();
cfg.CreateMap<SwapOrderResp, SwapOrder>().ReverseMap();
cfg.CreateMap<SwapOrderDto2, SwapOrderResp>().ReverseMap();
cfg.CreateMap<SwapLoseOrderDto, SwapOrderResp>().ReverseMap();
cfg.CreateMap<SwapLoseOrderDto2, SwapOrderResp>().ReverseMap();
});
IMapper mapper = config.CreateMapper();
List<SwapOrderBatteryResp> swapOrderBattery = mapper.Map<List<SwapOrderBatteryResp>>(batteryList);
List<SwapOrderDto> list = mapper.Map<List<SwapOrderDto>>(orderList);
List<SwapOrderDto2> list2 = mapper.Map<List<SwapOrderDto2>>(orderList);
// 换电订单
List<SwapOrderResp> swapOrderResp = mapper.Map<List<SwapOrderResp>>(orderList);
List<string> vehicleNoList = swapOrderResp.Select(resp => resp.VehicleNo).ToList() ?? new List<string>();
// 查询车辆的部门
List<BaseVehicle> vehicleList = await _baseVehicleRepository
.Queryable()
.In(vehicle => vehicle.VehicleNo, vehicleNoList)
.ToListAsync();
// 给换电订单赋值车的公司和部门
foreach (var swapOrder in swapOrderResp)
{
var matchingVehicle = vehicleList.FirstOrDefault(v => v.VehicleNo == swapOrder.VehicleNo);
if (matchingVehicle != null)
{
swapOrder.Company = matchingVehicle.Company;
swapOrder.Departments = matchingVehicle.Departments;
}
}
if (req.SwapResult == 0 || req.SwapResult == 1)
{
List<SwapOrderDto> list = mapper.Map<List<SwapOrderDto>>(swapOrderResp);
List<SwapOrderDto2> list2 = mapper.Map<List<SwapOrderDto2>>(swapOrderResp);
// 将电池数据添加到换电订单数据中
for (int i = 0; i < list.Count; i++)
@ -385,22 +433,17 @@ public class SwapOrderController : ControllerBase
if (swapOrderBatteryResp != null)
{
dto.DownBatterySoc = swapOrderBatteryResp.DownBatterySoc;
dto.DownBatteryRealSoc = swapOrderBatteryResp.DownBatteryRealSoc;
dto.DownBatteryLastSoc = swapOrderBatteryResp.DownBatteryLastSoc;
dto.DownBatteryNo = swapOrderBatteryResp.DownBatteryNo;
dto.UpBatteryNo = swapOrderBatteryResp.UpBatteryNo;
dto.UpBatterySoc = swapOrderBatteryResp.UpBatterySoc;
dto.UpBatteryRealSoc = swapOrderBatteryResp.UpBatteryRealSoc;
dto.DownBatteryBinNo = swapOrderBatteryResp.DownBatteryBinNo;
dto.UpBatteryBinNo = swapOrderBatteryResp.UpBatteryBinNo;
dto.StationNumber = StaticStationInfo.StationNumber;
try
{
dto.DownBatteryElectricQuantity = ((double)dto.DownBatterySoc * 3.75).ToString();
dto.UpBatteryElectricQuantity = ((double)dto.UpBatterySoc * 3.75).ToString();
double ElectricQuantity = ((float)(dto.UpBatterySoc - dto.DownBatterySoc)) * 3.75;
dto.ElectricQuantity = ElectricQuantity.ToString();
}
catch (Exception e)
{
@ -415,15 +458,11 @@ public class SwapOrderController : ControllerBase
if (swapOrderBatteryResp != null)
{
dto.DownBatterySoc = swapOrderBatteryResp.DownBatterySoc;
dto.DownBatteryRealSoc = swapOrderBatteryResp.DownBatteryRealSoc;
dto.DownBatteryLastSoc = swapOrderBatteryResp.DownBatteryLastSoc;
dto.DownBatteryNo = swapOrderBatteryResp.DownBatteryNo;
dto.UpBatteryNo = swapOrderBatteryResp.UpBatteryNo;
dto.UpBatterySoc = swapOrderBatteryResp.UpBatterySoc;
dto.UpBatteryRealSoc = swapOrderBatteryResp.UpBatteryRealSoc;
dto.DownBatteryBinNo = swapOrderBatteryResp.DownBatteryBinNo;
dto.UpBatteryBinNo = swapOrderBatteryResp.UpBatteryBinNo;
dto.StationNumber = StaticStationInfo.StationNumber;
try
{
dto.DownBatteryElectricQuantity = ((double)dto.DownBatterySoc * 3.75).ToString();
@ -449,6 +488,54 @@ public class SwapOrderController : ControllerBase
(language == "en" ? "_Swap_Orders.xlsx" : "2号站换电记录.xlsx")
};
}
else
{
List<SwapLoseOrderDto> list = mapper.Map<List<SwapLoseOrderDto>>(swapOrderResp);
List<SwapLoseOrderDto2> list2 = mapper.Map<List<SwapLoseOrderDto2>>(swapOrderResp);
// 将电池数据添加到换电订单数据中
for (int i = 0; i < list.Count; i++)
{
if (language == "en")
{
SwapLoseOrderDto2 dto = list2[i];
SwapOrderBatteryResp? swapOrderBatteryResp =
swapOrderBattery.FirstOrDefault(battery => battery.SwapOrderSn == dto.Sn);
if (swapOrderBatteryResp != null)
{
dto.DownBatteryBinNo = swapOrderBatteryResp.DownBatteryBinNo;
dto.UpBatteryBinNo = swapOrderBatteryResp.UpBatteryBinNo;
}
}
else
{
SwapLoseOrderDto dto = list[i];
SwapOrderBatteryResp? swapOrderBatteryResp =
swapOrderBattery.FirstOrDefault(battery => battery.SwapOrderSn == dto.Sn);
if (swapOrderBatteryResp != null)
{
dto.DownBatteryBinNo = swapOrderBatteryResp.DownBatteryBinNo;
dto.UpBatteryBinNo = swapOrderBatteryResp.UpBatteryBinNo;
}
}
}
IExcelExporter excelExporter = new ExcelExporter();
var res = language == "en"
? await excelExporter.ExportAsByteArray(list2)
: await excelExporter.ExportAsByteArray(list);
return new FileStreamResult(new MemoryStream(res), "application/octet-stream")
{
FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") +
(language == "en" ? "_Swap_Lose_Orders.xlsx" : "2号站换电失败记录.xlsx")
};
}
}
}

@ -0,0 +1,4 @@
ALTER TABLE swap_order
ADD COLUMN electricity_total_fee INT COMMENT '电费',
ADD COLUMN append_total_fee INT COMMENT '附加费',
ADD COLUMN total_fee INT COMMENT '总费用(所有的总费用)';
Loading…
Cancel
Save