|
|
|
using DS.Module.Core;
|
|
|
|
using DS.Module.Core.Enums;
|
|
|
|
using FluentValidation;
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
namespace DS.WMS.ContainerManagement.Info.Dtos;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 集装箱当前状态 请求实体
|
|
|
|
/// </summary>
|
|
|
|
public class CM_CurrentStateReq
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 主键Id
|
|
|
|
/// </summary>
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public long CtnBaseinfoId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// 所属机构(公司)
|
|
|
|
/// </summary>
|
|
|
|
public long? OrgId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// 集装箱号
|
|
|
|
/// </summary>
|
|
|
|
public string Cntrno { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// 箱型代码
|
|
|
|
/// </summary>
|
|
|
|
public string CtnCode { get; set; }
|
|
|
|
// <summary>
|
|
|
|
/// Desc:箱型
|
|
|
|
/// </summary>
|
|
|
|
public string Ctnall { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:新旧箱 空白/used/new
|
|
|
|
/// </summary>
|
|
|
|
public string UsedState { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱主id
|
|
|
|
/// </summary>
|
|
|
|
public long CtnOwnerId { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱主
|
|
|
|
/// </summary>
|
|
|
|
public string CtnOwner { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
|
|
|
|
/// </summary>
|
|
|
|
public CM_CtnSourceEnum? CtnSourceId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
|
|
|
|
/// </summary>
|
|
|
|
public string CtnSource => CtnSourceId?.GetDescription();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱当前业务状态id: 短租租出 长租租出 单程 卖箱
|
|
|
|
/// </summary>
|
|
|
|
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
|
|
|
|
/// </summary>
|
|
|
|
public string CtnBizState => CtnBizStateId?.GetDescription();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱业务编号:当前 对于租入、租出箱 记录其租箱业务billno
|
|
|
|
/// </summary>
|
|
|
|
public string Billno { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:关联放箱单号
|
|
|
|
/// </summary>
|
|
|
|
public string CtnReleaseNo { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱状态Id
|
|
|
|
/// </summary>
|
|
|
|
public CMCtnStateEnum? CtnStateId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱状态
|
|
|
|
/// </summary>
|
|
|
|
public string CtnState => CtnStateId?.GetDescription();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱流转状态Id
|
|
|
|
/// </summary>
|
|
|
|
public CMCtnFlowStateEnum? CtnFlowStateId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱流转状态
|
|
|
|
/// </summary>
|
|
|
|
public string CtnFlowState => CtnFlowStateId?.GetDescription();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱损坏/维修状态Id
|
|
|
|
/// </summary>
|
|
|
|
public CMCtnBreakStateEnum? CtnBreakStateId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:箱损坏/维修状态
|
|
|
|
/// </summary>
|
|
|
|
public string CtnBreakState => CtnBreakStateId?.GetDescription();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:是否上线id(是否管理中)
|
|
|
|
/// </summary>
|
|
|
|
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:是否上线(是否管理中)
|
|
|
|
/// </summary>
|
|
|
|
public string IsOnline => IsOnlineId?.GetDescription();
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:空重箱
|
|
|
|
/// </summary>
|
|
|
|
public bool? IsHeavy { get; set; } = false;
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:当前港口代码
|
|
|
|
/// </summary>
|
|
|
|
public long? Portid { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:当前港口五字码
|
|
|
|
/// </summary>
|
|
|
|
public string PortCode { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:当前港口
|
|
|
|
/// </summary>
|
|
|
|
public string Port { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:码头或场站
|
|
|
|
/// </summary>
|
|
|
|
public string Depot { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:船名航次
|
|
|
|
/// </summary>
|
|
|
|
public string? VesselVoyno { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:当前业务编号
|
|
|
|
/// </summary>
|
|
|
|
public string Mblno { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 业务委托单位Id
|
|
|
|
/// </summary>
|
|
|
|
public long CustomerId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// 业务委托单位
|
|
|
|
/// </summary>
|
|
|
|
public string CustomerName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:ETD
|
|
|
|
/// </summary>
|
|
|
|
public DateTime? ETD { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:ETD
|
|
|
|
/// </summary>
|
|
|
|
public DateTime? ETA { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:状态时间
|
|
|
|
/// </summary>
|
|
|
|
public DateTime? StateTime { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 箱皮重
|
|
|
|
/// </summary>
|
|
|
|
public decimal? CtnWeight { get; set; } = 0;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Desc:生产日期
|
|
|
|
/// </summary>
|
|
|
|
public DateTime? ProductionDate { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 箱初期成本
|
|
|
|
/// </summary>
|
|
|
|
public decimal? CtnValue_Base { get; set; } = 0;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 购入价格
|
|
|
|
/// </summary>
|
|
|
|
public decimal? CtnValue_BuyingPrice { get; set; } = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 验证
|
|
|
|
/// </summary>
|
|
|
|
public class CM_CurrentStateReqValidator : AbstractValidator<CM_CurrentStateReq>
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 构造函数
|
|
|
|
/// </summary>
|
|
|
|
public CM_CurrentStateReqValidator()
|
|
|
|
{
|
|
|
|
this.RuleFor(o => o.Cntrno)
|
|
|
|
.NotEmpty().WithName("集装箱号");
|
|
|
|
this.RuleFor(o => o.Ctnall)
|
|
|
|
.NotEmpty().WithName("箱型");
|
|
|
|
}
|
|
|
|
}
|