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.

185 lines
5.5 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>
[Required(ErrorMessage = "快递公司不能为空")]
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>
[Required(ErrorMessage = "收件省份不能为空")]
1 year ago
public string SJProvinceId { get; set; }
/// <summary>
/// 收件城市
/// </summary>
[Required(ErrorMessage = "收件城市不能为空")]
1 year ago
public string SJCity { get; set; }
/// <summary>
/// 收件地址
/// </summary>
[Required(ErrorMessage = "收件人地址不能为空")]
1 year ago
public string SJAddress { get; set; }
/// <summary>
/// 收件电话
/// </summary>
[Required(ErrorMessage = "收件人电话不能为空")]
1 year ago
public string SJTel { get; set; }
/// <summary>
/// 寄件公司
1 year ago
/// </summary>
public string FJCompany { get; set; }
/// <summary>
/// 寄件人
1 year ago
/// </summary>
[Required(ErrorMessage = "寄件人不能为空")]
1 year ago
public string FJPeople { get; set; }
/// <summary>
/// 寄件省份
1 year ago
/// </summary>
[Required(ErrorMessage = "寄件省份不能为空")]
1 year ago
public string FJProvince { get; set; }
/// <summary>
/// 寄件省份ID
1 year ago
/// </summary>
public string FJProvinceId { get; set; }
/// <summary>
/// 寄件城市
1 year ago
/// </summary>
[Required(ErrorMessage = "寄件城市不能为空")]
1 year ago
public string FJCity { get; set; }
/// <summary>
/// 寄件地址
1 year ago
/// </summary>
[Required(ErrorMessage = "寄件详细地址不能为空")]
1 year ago
public string FJAddress { 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; }
1 year ago
/// <summary>
/// 计费重量(带单位)
1 year ago
/// </summary>
public string FeeWeight { get; set; }
///// <summary>
///// 快递费
///// </summary>
//public decimal? KDFee { get; set; }
1 year ago
/// <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 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) }
);
}
}
}
1 year ago
}