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.

174 lines
5.1 KiB
C#

1 year ago
using Myshipping.Application.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
1 year ago
namespace Myshipping.Application.Service.ExpressDelivery.Dto
1 year ago
{
public class ExpressDeliveryDto : IValidatableObject
1 year ago
{
/// <summary>
///主键
/// </summary>
public long Id { get; set; }
/// <summary>
/// 快递号
/// </summary>
public string KDNO { get; set; }
/// <summary>
/// 快递日期
/// </summary>
public DateTime? Date { get; set; }
/// <summary>
/// 快递当前状态编码
1 year ago
/// </summary>
public string CurrentStateCode { get; set; }
1 year ago
/// <summary>
/// 快递当前状态描述
1 year ago
/// </summary>
public string CurrentStateDesc { get; set; }
1 year ago
/// <summary>
/// 快递公司
1 year ago
/// </summary>
public string KDCompany { get; set; }
1 year ago
/// <summary>
/// 收件公司
/// </summary>
public string SJCompany { get; set; }
/// <summary>
/// 收件人
/// </summary>
[Required(ErrorMessage = "收件人不能为空")]
1 year ago
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 = "收件人地址不能为空")]
1 year ago
public string SJAddress { get; set; }
/// <summary>
/// 收件邮编
/// </summary>
public string SJPostCode { get; set; }
/// <summary>
/// 收件电话
/// </summary>
[Required(ErrorMessage = "收件人电话不能为空")]
1 year ago
public string SJTel { get; set; }
/// <summary>
/// 发件公司
/// </summary>
public string FJCompany { get; set; }
/// <summary>
/// 发件人
/// </summary>
[Required(ErrorMessage = "发件人不能为空")]
1 year ago
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 = "发件人地址不能为空")]
1 year ago
public string FJAddress { get; set; }
/// <summary>
/// 发件邮编
/// </summary>
public string FJPostCode { get; set; }
/// <summary>
/// 发件电话
/// </summary>
[Required(ErrorMessage = "发件人电话不能为空")]
1 year ago
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; }
1 year ago
public List<ExpressDeliveryBusiness> Business { get; set; }
1 year ago
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (SettleAccountsTypeCode == "2" && string.IsNullOrWhiteSpace(MonthlyCard))
{
yield return new ValidationResult(
"当结费类型为“月结”时,需选择“月结卡号”"
, new[] { nameof(MonthlyCard) }
);
}
}
}
1 year ago
}