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.

198 lines
6.3 KiB

4 months ago
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
/// <summary>
/// ChargingOrder
/// </summary>
[ExcelExporter(Name = "Charge Orders", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class ChargeOrderDto2
{
[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)]
public DateTime? StartTime { get; set; }
[ExporterHeader(DisplayName = "End Time", IsBold = true, Width = 30, Format = "yyyy-MM-dd HH:mm:ss",
AutoCenterColumn = true)]
public DateTime? EndTime { 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 AC Quantity", IsBold = true)]
public decimal? StartAcElec { get; set; }
[ExporterHeader(DisplayName = "End AC Quantity", IsBold = true)]
public decimal? StopAcElec { 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
{
get
{
return StopReason switch
{
0 => "Automatic Stop When Fully Charged",
1 => "Manual Stop",
_ => "Unknown"
};
}
}
[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; }
}