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