You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.7 KiB

4 months ago
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
/// <summary>
/// ExportPowerReplacementOrder
/// </summary>
[ExcelExporter(Name = "Swap Orders", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class SwapOrderDto2
{
[ExporterHeader(DisplayName = "Order Number", IsBold = true)]
public string Sn { get; set; }
[ExporterHeader(DisplayName = "Vehicle Number", IsBold = true)]
public string VehicleNo { get; set; }
[ExporterHeader(DisplayName = "Vehicle MAC", IsBold = true)]
public string VehicleMac { get; set; }
[ExporterHeader(DisplayName = "Vehicle VIN", IsBold = true)]
public string VehicleVin { get; set; }
[ExporterHeader(DisplayName = "Vehicle Enter Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? VehicleEnterTime { get; set; }
[ExporterHeader(DisplayName = "Vehicle Leave Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? VehicleLeaveTime { get; set; }
[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 = "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
{
get
{
return SwapWay switch
{
1 => "Automatic Swap",
2 => "Manual Swap",
_ => "Unknown"
};
}
}
[ExporterHeader(IsIgnore = true)] public int? SwapWay { get; set; }
[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; }
[ExporterHeader(DisplayName = "Up Battery Number", IsBold = true)]
public string? UpBatteryNo { get; set; }
[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>
[ExporterHeader(DisplayName = "Electric Quantity", IsBold = true)]
public string ElectricQuantity { get; set; }
/// <summary>
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "亏电包电量", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
/// <summary>
/// 满电包电量
/// </summary>
[ExporterHeader(DisplayName = "满电包电量", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
4 months ago
}