|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Application.Service.ExpressDelivery.Dto
|
|
|
|
|
{
|
|
|
|
|
public class ExpressDeliveryDto : IValidatableObject
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///主键
|
|
|
|
|
/// </summary>
|
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string KDNO { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递日期
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? Date { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递当前状态编码
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string CurrentStateCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递当前状态描述
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string CurrentStateDesc { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递公司
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string KDCompany { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件公司
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SJCompany { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件人
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "收件人不能为空")]
|
|
|
|
|
public string SJPeople { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件省份
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SJProvince { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件省份Id
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SJProvinceId { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件城市
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SJCity { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件地址
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "收件人地址不能为空")]
|
|
|
|
|
public string SJAddress { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件邮编
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SJPostCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收件电话
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "收件人电话不能为空")]
|
|
|
|
|
public string SJTel { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件公司
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FJCompany { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件人
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "发件人不能为空")]
|
|
|
|
|
public string FJPeople { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件省份
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FJProvince { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件省份ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FJProvinceId { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件城市
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FJCity { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件地址
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "发件人地址不能为空")]
|
|
|
|
|
public string FJAddress { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件邮编
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FJPostCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发件电话
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "发件人电话不能为空")]
|
|
|
|
|
public string FJTel { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 品名
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string GOODSNAME { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 寄件数量
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int? KDNum { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 快递费
|
|
|
|
|
/// </summary>
|
|
|
|
|
public decimal? KDFee { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 备注
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Remark { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 业务类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string YWType { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string KDCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 船名
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string VESSEL { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 航次
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string VOYNO { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 委托单位
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string WTUnit { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ETD
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? SETD { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ETD
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? EETD { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 结费类型代码;1:现结;2:月结;3:到付
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required(ErrorMessage = "结费类型代码不能为空")]
|
|
|
|
|
public string SettleAccountsTypeCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 月结卡号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string MonthlyCard { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<ExpressDeliveryBusiness> Business { get; set; }
|
|
|
|
|
|
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
|
|
|
{
|
|
|
|
|
if (SettleAccountsTypeCode == "2" && string.IsNullOrWhiteSpace(MonthlyCard))
|
|
|
|
|
{
|
|
|
|
|
yield return new ValidationResult(
|
|
|
|
|
"当结费类型为“月结”时,需选择“月结卡号”"
|
|
|
|
|
, new[] { nameof(MonthlyCard) }
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|