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

75 lines
2.0 KiB
C#

using EntrustSettle.Model.Models;
using System;
namespace EntrustSettle.Model.Dtos
{
/// <summary>
/// 订单详情Dto
/// </summary>
public class OrderDto : Order
{
/// <summary>
/// 费用项目列表名称(使用,连接)
/// </summary>
public string ProjectTypeName
{
get
{
if (ProjectType == null) return null;
if (ProjectType == string.Empty) return string.Empty;
var types = ProjectType.Split(',');
var result = string.Empty;
foreach (var type in types)
{
switch (type)
{
case "1":
result += "港杂费,";
break;
case "2":
result += "堆存费,";
break;
}
}
return result.TrimEnd(',');
}
}
/// <summary>
/// 服务类型 1:码头堆存缴费 2:查验代理缴费 3:码头换船缴费
/// </summary>
public string ServiceTypeName => ServiceType switch
{
1 => "码头堆存缴费",
2 => "查验代理缴费",
3 => "码头换船缴费",
_ => "未知类型"
};
/// <summary>
/// 当前业务状态名称
/// </summary>
public string StatusName
{
get
{
if (Status == null)
{
return "";
}
return Enum.GetName(typeof(OrderStatusEnum), Status);
}
}
/// <summary>
/// 是否有账单附件
/// </summary>
public bool IsHasBillAnnex { get; set; }
/// <summary>
/// 是否有发票附件
/// </summary>
public bool IsHasInvoiceAnnex { get; set; }
}
}