|
|
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 SwapOrderDto
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
/// 站号
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "站号", IsBold = true)]
|
|
|
public string StationNumber { get; set; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:车牌号
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "车牌号", IsBold = true)]
|
|
|
public string VehicleNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:车辆mac
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "车辆mac", IsBold = true)]
|
|
|
public string VehicleMac { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:车辆vin码
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "车辆vin码", IsBold = true)]
|
|
|
public string VehicleVin { get; set; }
|
|
|
|
|
|
///// <summary>
|
|
|
///// Desc:车辆进场时间
|
|
|
///// Default:
|
|
|
///// Nullable:True
|
|
|
///// </summary>
|
|
|
//[ExporterHeader(DisplayName = "车辆进场时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
|
|
|
// AutoCenterColumn = true)]
|
|
|
//public DateTime? VehicleEnterTime { get; set; }
|
|
|
|
|
|
///// <summary>
|
|
|
///// Desc:车辆离场时间
|
|
|
///// Default:
|
|
|
///// Nullable:True
|
|
|
///// </summary>
|
|
|
//[ExporterHeader(DisplayName = "车辆离场时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
|
|
|
// AutoCenterColumn = true)]
|
|
|
//public DateTime? VehicleLeaveTime { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:换电开始时间
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "换电开始时间", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
|
|
|
AutoCenterColumn = true)]
|
|
|
public DateTime? SwapBeginTime { 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>
|
|
|
/// 换电时间(换电结束时间与换电开始时间之间的差值)
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "换电用时", Width = 30, Format = "c")]
|
|
|
public string SwapDuration
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
if (!SwapBeginTime.HasValue || !SwapEndTime.HasValue)
|
|
|
{
|
|
|
return "未知";
|
|
|
}
|
|
|
|
|
|
TimeSpan duration = SwapEndTime.Value - SwapBeginTime.Value;
|
|
|
return duration.ToString("c");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:换电结果;0-未知;1-成功;2-失败
|
|
|
/// Default:0
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "换电结果", IsBold = true)]
|
|
|
public string SwapResultDisplay
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return SwapResult switch
|
|
|
{
|
|
|
0 => "未知",
|
|
|
1 => "成功",
|
|
|
2 => "失败",
|
|
|
_ => "未知"
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:换电结果;0-未知;1-成功;2-失败
|
|
|
/// Default:0
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
// [ExporterHeader(DisplayName = "换电结果", IsBold = true)]
|
|
|
[ExporterHeader(IsIgnore = true)]
|
|
|
public int? SwapResult { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:失败原因
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "失败原因", IsBold = true)]
|
|
|
public string FailReason { 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; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:亏电包编码
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "电池编号(存)", IsBold = true)]
|
|
|
|
|
|
public string? DownBatteryNo { get; set; }
|
|
|
/// <summary>
|
|
|
/// Desc:亏电包soc
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "soc(存)", IsBold = true)]
|
|
|
|
|
|
public decimal? DownBatterySoc { 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 = "取电池仓位号", IsBold = true)]
|
|
|
|
|
|
public int? UpBatteryBinNo { 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; }
|
|
|
/// <summary>
|
|
|
/// 满电包电量
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "电池电量(取)", IsBold = true)]
|
|
|
public string? UpBatteryElectricQuantity { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 亏电包电量
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "电池电量(存)", IsBold = true)]
|
|
|
public string? DownBatteryElectricQuantity { get; set; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 电量差
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "电池差值", IsBold = true)]
|
|
|
public string ElectricQuantity { get; set; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:订单编号
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "订单编号", IsBold = true)]
|
|
|
public string Sn { 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(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; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:亏电包上次换电结算时soc
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "亏电包上次换电结算时soc", IsBold = true)]
|
|
|
|
|
|
public decimal? DownBatteryLastSoc { get; set; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:满电包真实soc
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[ExporterHeader(DisplayName = "满电包真实soc", IsBold = true)]
|
|
|
|
|
|
public decimal? UpBatteryRealSoc { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |