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.

276 lines
7.4 KiB

using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Entity.Dto;
/// <summary>
/// 换电订单导出
/// </summary>
2 months ago
[ExcelExporter(Name = "2号站换电记录", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)]
public class SwapOrderDto
{
/// <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? CreatedTime { 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)]
public string VehicleNo { get; set; }
[ExporterHeader(DisplayName = "车牌号", IsBold = true)]
public string VehicleNoCode { get; set; }
/// <summary>
/// Desc:公司
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "所属公司", IsBold = true)]
public string? Company {get;set;}
/// <summary>
/// Desc:部门
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "所属部门", IsBold = true)]
public string? Departments {get;set;}
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电类型", IsBold = true)]
public string SwapWayDisplay
{
get
{
return SwapWay switch
{
1 => "自动换电",
2 => "手动换电",
3 => "半自动换电",
_ => "未知"
};
}
}
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? SwapWay { get; set; }
2 months ago
///// <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; }
2 months ago
/// <summary>
/// 换电时间(换电结束时间与换电开始时间之间的差值)
/// </summary>
[ExporterHeader(DisplayName = "换电用时", Width = 30, Format = "c")]
2 months ago
public string SwapDuration
{
get
{
if (!SwapBeginTime.HasValue || !SwapEndTime.HasValue)
{
return "未知";
}
TimeSpan duration = SwapEndTime.Value - SwapBeginTime.Value;
return duration.ToString("c");
}
}
/// <summary>
/// Desc:取电池仓位号 满电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电仓位(取)", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
2 months ago
/// <summary>
/// Desc:满电包编码
/// Default:
2 months ago
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池编号(取)", IsBold = true)]
public string? UpBatteryNo { get; set; }
2 months ago
/// <summary>
/// 满电包电量
2 months ago
/// </summary>
[ExporterHeader(DisplayName = "换池电量kWh", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
2 months ago
/// <summary>
/// Desc:满电包soc
2 months ago
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public decimal? UpBatterySoc { get; set; }
[ExporterHeader(DisplayName = "soc", IsBold = true)]
public string? UpBatterySocDto
{
get
{
return UpBatterySoc.HasValue ? $"{UpBatterySoc.Value.ToString("0.00")}%" : null;
}
}
2 months ago
2 months ago
/// <summary>
/// Desc:放电池仓位号 亏电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "换电仓位(存)", IsBold = true)]
2 months ago
public int? DownBatteryBinNo { get; set; }
/// <summary>
/// Desc:亏电包编码
2 months ago
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池编号(存)", IsBold = true)]
2 months ago
public string? DownBatteryNo { get; set; }
2 months ago
/// <summary>
/// 亏电包电量
2 months ago
/// </summary>
[ExporterHeader(DisplayName = "换池电量kwh", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
2 months ago
/// <summary>
/// Desc:亏电包soc
2 months ago
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public decimal? DownBatterySoc { get; set; }
2 months ago
[ExporterHeader(DisplayName = "soc", IsBold = true)]
public string? DownBatterySocDto
{
get
{
return DownBatterySoc.HasValue ? $"{DownBatterySoc.Value.ToString("0.00")}%" : null;
}
}
2 months ago
/// <summary>
/// 电量差
/// </summary>
[ExporterHeader(DisplayName = "电量差kwh", IsBold = true)]
2 months ago
public string ElectricQuantity { get; set; }
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
2 months ago
[ExporterHeader(IsIgnore = true)]
2 months ago
public string Sn { get; set; }
/// <summary>
/// 换电服务费用
/// </summary>
2 months ago
[ExporterHeader(DisplayName = "服务费", IsBold = true)]
public decimal? ServiceTotalFee { get; set; }
/// <summary>
/// 电费
/// </summary>
[ExporterHeader(DisplayName = "电费", IsBold = true)]
public decimal? ElectricityTotalFee { get; set; }
2 months ago
/// <summary>
/// 附加费
/// </summary>
[ExporterHeader(DisplayName = "附加费", IsBold = true)]
public decimal? AppendTotalFee { get; set; }
2 months ago
/// <summary>
/// 总费用(所有的总费用)
/// </summary>
2 months ago
[ExporterHeader(DisplayName = "总费用", IsBold = true)]
public decimal? TotalFee { get; set; }
2 months ago
2 months ago
[ExporterHeader(DisplayName = "备注", IsBold = true)]
public string? ManualStep { get; set; }
}