|
|
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>
|
|
|
[Required(ErrorMessage = "快递公司不能为空")]
|
|
|
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>
|
|
|
[Required(ErrorMessage = "收件省份不能为空")]
|
|
|
public string SJProvinceId { get; set; }
|
|
|
/// <summary>
|
|
|
/// 收件城市
|
|
|
/// </summary>
|
|
|
[Required(ErrorMessage = "收件城市不能为空")]
|
|
|
public string SJCity { get; set; }
|
|
|
/// <summary>
|
|
|
/// 收件地址
|
|
|
/// </summary>
|
|
|
[Required(ErrorMessage = "收件人地址不能为空")]
|
|
|
public string SJAddress { 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>
|
|
|
[Required(ErrorMessage = "寄件省份不能为空")]
|
|
|
public string FJProvince { get; set; }
|
|
|
/// <summary>
|
|
|
/// 寄件省份ID
|
|
|
/// </summary>
|
|
|
public string FJProvinceId { get; set; }
|
|
|
/// <summary>
|
|
|
/// 寄件城市
|
|
|
/// </summary>
|
|
|
[Required(ErrorMessage = "寄件城市不能为空")]
|
|
|
public string FJCity { get; set; }
|
|
|
/// <summary>
|
|
|
/// 寄件地址
|
|
|
/// </summary>
|
|
|
[Required(ErrorMessage = "寄件详细地址不能为空")]
|
|
|
public string FJAddress { 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 string FeeWeight { 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 List<ExpressDeliveryFee> FeeList { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 保存的同时,是否下单快递
|
|
|
/// </summary>
|
|
|
public bool IsSending { get; set; }
|
|
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
|
{
|
|
|
if (SettleAccountsTypeCode == "2" && string.IsNullOrWhiteSpace(MonthlyCard))
|
|
|
{
|
|
|
yield return new ValidationResult(
|
|
|
"当结费类型为“月结”时,需选择“月结卡号”"
|
|
|
, new[] { nameof(MonthlyCard) }
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|