using System.Runtime.Serialization;
using DS.Module.Core.Enums;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Info.Dtos;
///
/// 客户基本信息请求实体
///
public class ClientInfoReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// Desc:客户代码
///
public string CodeName { get; set; }
///
/// Desc:客户简称
///
public string ShortName { get; set; }
///
/// Desc:客户中文名称或描述信息
///
public string Description { get; set; }
///
/// Desc:客户英文简称
///
public string Name { get; set; }
///
/// Desc:客户英文全称
///
public string EnFullName { get; set; }
///
/// Desc:通讯地址
///
public string Address { get; set; }
///
/// Desc:邮箱
///
public string Email { get; set; }
///
/// Desc:网页
///
public string Web { get; set; }
///
/// Desc:电话
///
public string Tel { get; set; }
///
/// Desc:传真
///
public string Fax { get; set; }
///
/// Desc:负责人
///
public string Chief { get; set; }
///
/// Desc:国家
///
public string Country { get; set; }
///
/// Desc:省或州
///
public string Province { get; set; }
///
/// Desc:城市
///
public string City { get; set; }
///
/// Desc:提单信息
///
public string BLContent { get; set; }
///
/// Desc:是否停用
///
public bool IsStop { get; set; }
/////
///// Desc:发票抬头1
/////
//public string BillRises1 { get; set; }
/////
///// Desc:发票抬头2
/////
//public string BillRises2 { get; set; }
/////
///// Desc:美元支票抬头
/////
//public string USDBillRises { get; set; }
/////
///// Desc:人民币支票抬头
/////
//public string RMBBillRises { get; set; }
/////
///// Desc:人民币开户银行
/////
//public string RMBBank { get; set; }
/////
///// Desc:人民币账号
/////
//public string RMBAccount { get; set; }
/////
///// Desc:人民币联机行号
/////
//public string RMBOnlineNO { get; set; }
/////
///// Desc:美元开户银行
/////
//public string USDBank { get; set; }
/////
///// Desc:美元账号
/////
//public string USDAccount { get; set; }
/////
///// Desc:美元联机行号
/////
//public string USDOnlineNO { get; set; }
/////
///// Desc:自定义属性1
/////
//public string CustomAttributes1 { get; set; }
/////
///// Desc:自定义属性2
/////
//public string CustomAttributes2 { get; set; }
/////
///// Desc:美元信用最大金额
/////
//public decimal? USDMaxAmountCredit { get; set; } = 0;
/////
///// Desc:人民币信用最大金额
/////
//public decimal? RMBMaxAmountCredit { get; set; } = 0;
/////
///// Desc:信用最大金额(RMB+USD)
/////
//public decimal? MaxAmountCredit { get; set; } = 0;
/////
///// Desc:结算方式编码
/////
//public string StlName { get; set; }
/////
///// Desc:美金汇率
/////
//public decimal? USDExchangeRate { get; set; }
/////
///// Desc:月结算时间
/////
//public string StlDate { get; set; }
/////
///// Desc:上半月结算时间
/////
//public string StlFirstHalfDate { get; set; }
/////
///// Desc:下半月结算时间
/////
//public string StlMiddleDate { get; set; }
/////
///// Desc:票结结算时间
/////
//public string InvoiceStlDate { get; set; }
///
/// Desc:等级
///
public string Level { get; set; }
///
/// Desc:QQ
///
public string QQ { get; set; }
///
/// Desc:MSN
///
public string MSN { get; set; }
///
/// Desc:财务应收账款代码
///
public string FARCode { get; set; }
///
/// Desc:财务应付账款代码
///
public string FAPCode { get; set; }
///
/// Desc:冷藏费率
///
public string UnitPrice { get; set; }
///
/// Desc:企业备案号
///
public string RegistrationNo { get; set; }
///
/// Desc:财务序号
///
public string OrderNo { get; set; }
///
/// Desc:纳税人识别号
///
public string TaxNo { get; set; }
///
/// Desc:EDI代码
///
public string EDICode { get; set; }
///
/// Desc:EDI代码2
///
public string EDICode2 { get; set; }
///
/// Desc:EDI代码3
///
public string EDICode3 { get; set; }
///
/// Desc:组织机构代码
///
public string OrganizationCode { get; set; }
///
/// 所属集团ID
///
public long? PcorpId { get; set; }
///
/// Desc: 所属集团
///
public string? PcorpName { get; set; }
///
/// Desc:企业商检备案号
///
public string InspectionNo { get; set; }
///
/// 审批时间
///
public DateTime? AuditTime { get; set; }
///
/// 审批意见
///
public string AuditNote { get; set; }
///
/// Desc:默认付费方式
///
public string FeeFRT { get; set; }
///
/// Desc:业务来源Id
///
public long SourceId { get; set; }
///
/// Desc:发票银行
///
public string InvoiceBank { get; set; }
///
/// Desc:发票地址电话
///
public string InvoiceAddrTel { get; set; }
///
/// 所属分部
///
public long[]? SaleOrgIdList { get; set; }
/////
///// 所属分部值
/////
//[IgnoreDataMember]
//public string? SaleOrgId => SaleOrgIdList == null ? null : string.Join(",", SaleOrgIdList);
///
/// Desc:所属分部值
///
public string? SaleOrgId { get; set; }
///
/// Desc:提成比例
///
public decimal CommissionRate { get; set; }
///
/// Desc:分成比例
///
public decimal ProportionRate { get; set; }
///
/// Desc:提成参与人
///
public long CommissionUserId { get; set; }
///
/// Desc:运输公司列表
///
public string CarrierList { get; set; }
///
/// Desc:集装箱尺寸
///
public string CtnType { get; set; }
///
/// Desc:英文简称
///
public string EnShortName { get; set; }
///
/// Desc:仓储费开始日期模式
///
public string WMSFeeRateType { get; set; }
///
/// 备注
///
public string? Note { get; set; }
///
/// 客户标识
///
public ClientTagReq ClientTag { get; set; }
///
/// 是否共享
///
public bool IsShared { get; set; }
///
/// 揽货人Id
///
public long? SaleId { get; set; }
///
/// 揽货人
///
public string Sale { get; set; }
///
/// Desc:单证
///
public long? Doc { get; set; }
///
/// Desc:单证人员
///
public string DocName { get; set; }
///
/// 操作员
///
public long? OperatorId { get; set; }
///
/// 操作员名称
///
public string OperatorName { get; set; }
///
/// 客服
///
public long? CustomerService { get; set; }
///
/// 客服名称
///
public string CustomerServiceName { get; set; }
///
/// 开票方式
///
public InvoicingMethod? InvoicingMethod { get; set; }
///
/// 推送设置
///
public PushNotification[]? Notifications { get; set; }
[IgnoreDataMember]
public PushNotification Notification
{
get
{
if (Notifications == null || Notifications.Length == 0)
return PushNotification.None;
PushNotification flags = PushNotification.None;
for (int i = 0; i < Notifications.Length; i++)
flags |= Notifications[i];
return flags;
}
}
///
/// 是否超期扣单
///
public bool IsOverdueDeduction { get; set; }
///
/// 超期天数
///
public int OverdueDays { get; set; }
///
/// 是否押最后一单
///
public bool IsMortgageLastOrder { get; set; }
///
/// Desc:业务来源明细Id
///
public long SourceDetailId { get; set; }
///
/// Desc:业务来源名称
///
public string SourceName { get; set; }
///
/// Desc:业务来源明细名称
///
public string SourceDetailName { get; set; }
///
/// 所属分部名称
///
public string? SaleOrgName { get; set; }
///
/// 服务项目代码
///
public string[]? ServiceItemCodes { get; set; }
///
/// 是否为客户
///
public bool IsCustomer { get; set; }
///
/// 是否为供应商
///
public bool IsSupplier { get; set; }
///
/// 客户等级:A/B/C/D
///
public string? Grade { get; set; }
///
/// 注册资金
///
public string? RegisteredCapital { get; set; }
///
/// 注册时间
///
public DateTime? RegistrationTime { get; set; }
///
/// 是否冻结
///
public bool IsFrozen { get; set; }
///
/// 账单抬头
///
public string? BillHeader { get; set; }
///
/// 进账人民币账户ID
///
public long? RMBAccountId { get; set; }
///
/// 进账人民币银行名称
///
public string RMBBankName { get; set; }
///
/// Desc:进账人民币银行账户
///
public string RMBBankAccountNo { get; set; }
///
/// 进账美金账户ID
///
public long? USDAccountId { get; set; }
///
/// 进账美金银行名称
///
public string USDBankName { get; set; }
///
/// Desc:进账美金银行账户
///
public string USDBankAccountNo { get; set; }
}
///
/// 验证
///
public class ClientInfoReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ClientInfoReqValidator()
{
//this.RuleFor(o => o.CodeName)
// .NotEmpty().WithName("客户代码");
this.RuleFor(o => o.ShortName)
.NotEmpty().WithName("客户简称");
}
}