usertest
zhangxiaofeng 4 months ago
commit 93939df8d9

@ -1,6 +1,7 @@
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Info.Dtos;
@ -20,20 +21,25 @@ public class ClientContactReq
public long ClientId { get; set; }
/// <summary>
/// Desc:联系人代码
/// Desc:联系人姓名
/// </summary>
public string CodeName { get; set; }
public string Name { get; set; }
/// <summary>
/// Desc:联系人简称
/// Desc:联系人英文名
/// </summary>
public string ShortName { get; set; }
public string? EnName { get; set; }
/// <summary>
/// Desc:职务
/// </summary>
public string Job { get; set; }
[IgnoreDataMember]
public string? Job => Jobs == null ? null : string.Join(",", Jobs);
/// <summary>
/// 职务
/// </summary>
public string[]? Jobs { get; set; }
/// <summary>
/// Desc:通讯地址
@ -68,72 +74,72 @@ public class ClientContactReq
/// <summary>
/// Desc:是否为操作
/// </summary>
public bool? IsOperator { get; set; } = false;
public bool IsOperator { get; set; }
/// <summary>
/// Desc:是否为财务
/// </summary>
public bool? IsFinancialStaff { get; set; } = false;
public bool IsFinancialStaff { get; set; }
/// <summary>
/// Desc:是否为销售
/// </summary>
public bool? IsSaleMan { get; set; } = false;
public bool IsSaleMan { get; set; }
/// <summary>
/// Desc:是否为其他
/// </summary>
public bool? IsOther { get; set; } = false;
public bool IsOther { get; set; }
/// <summary>
/// Desc:是否保险联系人
/// </summary>
public bool? IsInsurance { get; set; } = false;
public bool IsInsurance { get; set; }
/// <summary>
/// Desc:是否对账联系人
/// </summary>
public bool? IsCheckAccount { get; set; } = false;
public bool IsCheckAccount { get; set; }
/// <summary>
/// 提醒日期1
/// </summary>
public DateTime Anniversary1 { get; set; }
public DateTime? Anniversary1 { get; set; }
/// <summary>
/// 提醒日期2
/// </summary>
public DateTime Anniversary2 { get; set; }
public DateTime? Anniversary2 { get; set; }
/// <summary>
/// 提醒备注1
/// </summary>
public string AnniversaryNote1 { get; set; }
public string? AnniversaryNote1 { get; set; }
/// <summary>
/// 提醒备注2
/// </summary>
public string AnniversaryNote2 { get; set; }
public string? AnniversaryNote2 { get; set; }
///// <summary>
///// 船公司Id
///// </summary>
//public long? CarrierId { get; set; }
///// <summary>
///// 船公司
///// </summary>
//public string? Carrier { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; } = 0;
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
public StatusEnum Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
public string? Note { get; set; }
}
/// <summary>
@ -146,9 +152,7 @@ public class ClientContactReqValidator : AbstractValidator<ClientContactReq>
/// </summary>
public ClientContactReqValidator()
{
this.RuleFor(o => o.CodeName)
.NotEmpty().WithName("联系人代码");
this.RuleFor(o => o.ShortName)
.NotEmpty().WithName("联系人简称");
this.RuleFor(o => o.Name)
.NotEmpty().WithName("联系人姓名");
}
}

@ -1,4 +1,6 @@
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Info.Dtos;
@ -18,20 +20,25 @@ public class ClientContactRes
public long ClientId { get; set; }
/// <summary>
/// Desc:联系人代码
/// Desc:联系人姓名
/// </summary>
public string CodeName { get; set; }
public string Name { get; set; }
/// <summary>
/// Desc:联系人简称
/// Desc:联系人英文名
/// </summary>
public string ShortName { get; set; }
public string? EnName { get; set; }
/// <summary>
/// Desc:职务
/// </summary>
public string Job { get; set; }
[IgnoreDataMember]
public string? Job { get; set; }
/// <summary>
/// 职务
/// </summary>
public string[]? Jobs => Job.IsNullOrEmpty() ? [] : Job.Split([','], StringSplitOptions.RemoveEmptyEntries);
/// <summary>
/// Desc:通讯地址
@ -66,71 +73,73 @@ public class ClientContactRes
/// <summary>
/// Desc:是否为操作
/// </summary>
public bool? IsOperator { get; set; } = false;
public bool IsOperator { get; set; }
/// <summary>
/// Desc:是否为财务
/// </summary>
public bool? IsFinancialStaff { get; set; } = false;
public bool IsFinancialStaff { get; set; }
/// <summary>
/// Desc:是否为销售
/// </summary>
public bool? IsSaleMan { get; set; } = false;
public bool IsSaleMan { get; set; }
/// <summary>
/// Desc:是否为其他
/// </summary>
public bool? IsOther { get; set; } = false;
public bool IsOther { get; set; }
/// <summary>
/// Desc:是否保险联系人
/// </summary>
public bool? IsInsurance { get; set; } = false;
public bool IsInsurance { get; set; }
/// <summary>
/// Desc:是否对账联系人
/// </summary>
public bool? IsCheckAccount { get; set; } = false;
public bool IsCheckAccount { get; set; }
/// <summary>
/// 提醒日期1
/// </summary>
public DateTime Anniversary1 { get; set; }
public DateTime? Anniversary1 { get; set; }
/// <summary>
/// 提醒日期2
/// </summary>
public DateTime Anniversary2 { get; set; }
public DateTime? Anniversary2 { get; set; }
/// <summary>
/// 提醒备注1
/// </summary>
public string AnniversaryNote1 { get; set; }
public string? AnniversaryNote1 { get; set; }
/// <summary>
/// 提醒备注2
/// </summary>
public string AnniversaryNote2 { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
public string? AnniversaryNote2 { get; set; }
///// <summary>
///// 船公司Id
///// </summary>
//public long? CarrierId { get; set; }
///// <summary>
///// 船公司
///// </summary>
//public string? Carrier { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
public StatusEnum Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
public string? Note { get; set; }
/// <summary>
/// 创建时间
/// </summary>

@ -16,7 +16,6 @@ public class ClientInfoReq
/// </summary>
public long Id { get; set; }
/// <summary>
/// Desc:客户代码
/// </summary>
@ -103,7 +102,6 @@ public class ClientInfoReq
/// </summary>
public string City { get; set; }
/// <summary>
/// Desc:提单信息
/// </summary>
@ -112,7 +110,7 @@ public class ClientInfoReq
/// <summary>
/// Desc:是否停用
/// </summary>
public bool? IsStop { get; set; } = false;
public bool IsStop { get; set; }
///// <summary>
///// Desc:发票抬头1
@ -306,7 +304,7 @@ public class ClientInfoReq
/// <summary>
/// 审批状态
/// </summary>
public AuditStatusEnum? AuditStatus { get; set; } = AuditStatusEnum.Approve;
public AuditStatusEnum AuditStatus { get; set; } = AuditStatusEnum.Approve;
/// <summary>
/// 审批时间
@ -341,19 +339,25 @@ public class ClientInfoReq
public string InvoiceAddrTel { get; set; }
/// <summary>
/// Desc:所属分部
/// 所属分部
/// </summary>
public long[]? SaleOrgIdList { get; set; }
/// <summary>
/// 所属分部值
/// </summary>
public long? SaleOrgId { get; set; }
[IgnoreDataMember]
public string? SaleOrgId => SaleOrgIdList == null ? null : string.Join(",", SaleOrgIdList);
/// <summary>
/// Desc:提成比例
/// </summary>
public decimal? CommissionRate { get; set; } = 0;
public decimal CommissionRate { get; set; }
/// <summary>
/// Desc:分成比例
/// </summary>
public decimal? ProportionRate { get; set; } = 0;
public decimal ProportionRate { get; set; }
/// <summary>
/// Desc:提成参与人
@ -374,7 +378,7 @@ public class ClientInfoReq
/// <summary>
/// Desc: 客服
/// </summary>
public long CustomerService { get; set; } = 0;
public long CustomerService { get; set; }
/// <summary>
/// Desc:英文简称
@ -386,16 +390,15 @@ public class ClientInfoReq
/// </summary>
public string WMSFeeRateType { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
public StatusEnum Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
public string Note { get; set; }
/// <summary>
/// 客户标识
@ -426,9 +429,9 @@ public class ClientInfoReq
return PushNotification.None;
PushNotification flags = PushNotification.None;
for (int i = 0; i < Notifications.Length; i++)
for (int i = 0; i < Notifications.Length; i++)
flags |= Notifications[i];
return flags;
}
}

@ -1,6 +1,7 @@
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Info.Entity;
using Masuit.Tools.Systems;
@ -86,7 +87,6 @@ public class ClientInfoRes
/// </summary>
public long Doc { get; set; }
/// <summary>
/// Desc:国家
/// </summary>
@ -102,7 +102,6 @@ public class ClientInfoRes
/// </summary>
public string City { get; set; }
/// <summary>
/// Desc:提单信息
/// </summary>
@ -111,7 +110,7 @@ public class ClientInfoRes
/// <summary>
/// Desc:是否停用
/// </summary>
public bool? IsStop { get; set; } = false;
public bool IsStop { get; set; }
///// <summary>
///// Desc:发票抬头1
@ -224,7 +223,6 @@ public class ClientInfoRes
/// </summary>
public string Level { get; set; }
/// <summary>
/// Desc:QQ
/// </summary>
@ -235,7 +233,6 @@ public class ClientInfoRes
/// </summary>
public string MSN { get; set; }
/// <summary>
/// Desc:财务应收账款代码
/// </summary>
@ -305,7 +302,7 @@ public class ClientInfoRes
/// <summary>
/// 审批状态
/// </summary>
public AuditStatusEnum? AuditStatus { get; set; } = AuditStatusEnum.Approve;
public AuditStatusEnum AuditStatus { get; set; } = AuditStatusEnum.Approve;
/// <summary>
/// 审批时间
@ -317,14 +314,11 @@ public class ClientInfoRes
/// </summary>
public string AuditNote { get; set; }
/// <summary>
/// Desc:默认付费方式
/// </summary>
public string FeeFRT { get; set; }
/// <summary>
/// Desc:业务来源Id
/// </summary>
@ -341,19 +335,31 @@ public class ClientInfoRes
public string InvoiceAddrTel { get; set; }
/// <summary>
/// Desc:所属分部
/// 所属分部值
/// </summary>
[IgnoreDataMember]
public string? SaleOrgId { get; set; }
/// <summary>
/// 所属分部
/// </summary>
public long[] SaleOrgIdList => SaleOrgId.IsNullOrEmpty() ? [] :
SaleOrgId.Split([','], StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
/// <summary>
/// 所属分部名称
/// </summary>
public long? SaleOrgId { get; set; }
public string? SaleOrgNames { get; set; }
/// <summary>
/// Desc:提成比例
/// </summary>
public decimal? CommissionRate { get; set; } = 0;
public decimal CommissionRate { get; set; }
/// <summary>
/// Desc:分成比例
/// </summary>
public decimal? ProportionRate { get; set; } = 0;
public decimal ProportionRate { get; set; }
/// <summary>
/// Desc:提成参与人
@ -370,11 +376,10 @@ public class ClientInfoRes
/// </summary>
public string CtnType { get; set; }
/// <summary>
/// Desc: 客服
/// </summary>
public long CustomerService { get; set; } = 0;
public long CustomerService { get; set; }
/// <summary>
/// Desc:英文简称
@ -389,13 +394,12 @@ public class ClientInfoRes
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
public StatusEnum Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
public string Note { get; set; }
/// <summary>
/// 创建时间

@ -12,7 +12,7 @@ namespace DS.WMS.Core.Info.Entity;
public class InfoClient : BaseModelV2<long>
{
/// <summary>
/// Desc:客户代码
/// 客户代码(助记码)
/// </summary>
[SugarColumn(ColumnDescription = "客户代码", IsNullable = false, Length = 20)]
public string CodeName { get; set; }
@ -27,19 +27,19 @@ public class InfoClient : BaseModelV2<long>
/// Desc:客户中文名称或描述信息
/// </summary>
[SugarColumn(ColumnDescription = "客户中文名称或描述信息", IsNullable = true, Length = 50)]
public string Description { get; set; }
public string? Description { get; set; }
/// <summary>
/// Desc:客户英文简称
/// </summary>
[SugarColumn(ColumnDescription = "客户英文简称", IsNullable = true, Length = 50)]
public string Name { get; set; }
public string? Name { get; set; }
/// <summary>
/// Desc:客户英文全称
/// </summary>
[SugarColumn(ColumnDescription = "客户英文全称", IsNullable = true, Length = 50)]
public string EnFullName { get; set; }
public string? EnFullName { get; set; }
/// <summary>
/// Desc:客户状态
@ -51,7 +51,7 @@ public class InfoClient : BaseModelV2<long>
/// Desc:通讯地址
/// </summary>
[SugarColumn(ColumnDescription = "通讯地址", IsNullable = true, Length = 1000)]
public string Address { get; set; }
public string? Address { get; set; }
/// <summary>
/// Desc:邮箱
@ -63,75 +63,74 @@ public class InfoClient : BaseModelV2<long>
/// Desc:网页
/// </summary>
[SugarColumn(ColumnDescription = "网页", IsNullable = true, Length = 50)]
public string Web { get; set; }
public string? Web { get; set; }
/// <summary>
/// Desc:电话
/// </summary>
[SugarColumn(ColumnDescription = "电话", IsNullable = true, Length = 50)]
public string Tel { get; set; }
public string? Tel { get; set; }
/// <summary>
/// Desc:传真
/// </summary>
[SugarColumn(ColumnDescription = "传真", IsNullable = true, Length = 50)]
public string Fax { get; set; }
public string? Fax { get; set; }
/// <summary>
/// Desc:负责人
/// </summary>
[SugarColumn(ColumnDescription = "负责人", IsNullable = true, Length = 20)]
public string Chief { get; set; }
public string? Chief { get; set; }
/// <summary>
/// Desc:所属揽货人
/// </summary>
[SugarColumn(ColumnDescription = "所属揽货人", IsNullable = true)]
public long SaleId { get; set; }
public long? SaleId { get; set; }
/// <summary>
/// Desc:所属操作人
/// </summary>
[SugarColumn(ColumnDescription = "所属操作人", IsNullable = true)]
public long Op { get; set; }
public long? Op { get; set; }
/// <summary>
/// Desc:所属单证
/// </summary>
[SugarColumn(ColumnDescription = "所属单证", IsNullable = true)]
public long Doc { get; set; }
public long? Doc { get; set; }
/// <summary>
/// Desc:国家
/// </summary>
[SugarColumn(ColumnDescription = "国家", Length = 50, IsNullable = true)]
public string Country { get; set; }
public string? Country { get; set; }
/// <summary>
/// Desc:省或州
/// </summary>
[SugarColumn(ColumnDescription = "省或州", Length = 50, IsNullable = true)]
public string Province { get; set; }
public string? Province { get; set; }
/// <summary>
/// Desc:城市
/// </summary>
[SugarColumn(ColumnDescription = "城市", Length = 50, IsNullable = true)]
public string City { get; set; }
public string? City { get; set; }
/// <summary>
/// Desc:提单信息
/// </summary>
[SugarColumn(ColumnDescription = "提单信息", Length = 600, IsNullable = true)]
public string BLContent { get; set; }
public string? BLContent { get; set; }
/// <summary>
/// Desc:是否停用该客户信息
/// </summary>
[SugarColumn(ColumnDescription = "是否停用该客户信息", DefaultValue = "0")]
public bool? IsStop { get; set; } = false;
public bool IsStop { get; set; }
///// <summary>
///// Desc:发票抬头1
@ -264,84 +263,79 @@ public class InfoClient : BaseModelV2<long>
/// Desc:等级
/// </summary>
[SugarColumn(ColumnDescription = "等级", Length = 1, IsNullable = true)]
public string Level { get; set; }
public string? Level { get; set; }
/// <summary>
/// Desc:QQ
/// </summary>
[SugarColumn(ColumnDescription = "QQ", Length = 50, IsNullable = true)]
public string QQ { get; set; }
public string? QQ { get; set; }
/// <summary>
/// Desc:MSN
/// </summary>
[SugarColumn(ColumnDescription = "MSN", Length = 50, IsNullable = true)]
public string MSN { get; set; }
public string? MSN { get; set; }
/// <summary>
/// Desc:财务应收账款代码
/// </summary>
[SugarColumn(ColumnDescription = "财务应收账款代码", Length = 50, IsNullable = true)]
public string FARCode { get; set; }
public string? FARCode { get; set; }
/// <summary>
/// Desc:财务应付账款代码
/// </summary>
[SugarColumn(ColumnDescription = "财务应付账款代码", Length = 50, IsNullable = true)]
public string FAPCode { get; set; }
public string? FAPCode { get; set; }
/// <summary>
/// Desc:冷藏费率
/// </summary>
[SugarColumn(ColumnDescription = "冷藏费率", Length = 50, DefaultValue = "0", IsNullable = true)]
public string UnitPrice { get; set; }
public string? UnitPrice { get; set; }
/// <summary>
/// Desc:企业备案号
/// </summary>
[SugarColumn(ColumnDescription = "企业备案号", Length = 50, IsNullable = true)]
public string RegistrationNo { get; set; }
public string? RegistrationNo { get; set; }
/// <summary>
/// Desc:财务序号
/// </summary>
[SugarColumn(ColumnDescription = "财务序号", Length = 50, IsNullable = true)]
public string OrderNo { get; set; }
public string? OrderNo { get; set; }
/// <summary>
/// Desc:纳税人识别号
/// </summary>
[SugarColumn(ColumnDescription = "纳税人识别号", Length = 30, IsNullable = true)]
public string TaxNo { get; set; }
public string? TaxNo { get; set; }
/// <summary>
/// Desc:EDI代码
/// </summary>
[SugarColumn(ColumnDescription = "EDI代码", Length = 20, IsNullable = true)]
public string EDICode { get; set; }
public string? EDICode { get; set; }
/// <summary>
/// Desc:EDI代码2
/// </summary>
[SugarColumn(ColumnDescription = "EDI代码2", Length = 20, IsNullable = true)]
public string EDICode2 { get; set; }
public string? EDICode2 { get; set; }
/// <summary>
/// Desc:EDI代码3
/// </summary>
[SugarColumn(ColumnDescription = "EDI代码3", Length = 20, IsNullable = true)]
public string EDICode3 { get; set; }
public string? EDICode3 { get; set; }
/// <summary>
/// Desc:组织机构代码
/// </summary>
[SugarColumn(ColumnDescription = "组织机构代码", Length = 50, IsNullable = true)]
public string OrganizationCode { get; set; }
public string? OrganizationCode { get; set; }
/// <summary>
/// 所属集团ID
@ -359,32 +353,32 @@ public class InfoClient : BaseModelV2<long>
/// Desc:企业商检备案号
/// </summary>
[SugarColumn(ColumnDescription = "商检备案号", Length = 50, IsNullable = true)]
public string InspectionNo { get; set; }
public string? InspectionNo { get; set; }
/// <summary>
/// 审批状态
/// </summary>
[SugarColumn(ColumnDescription = "审批状态", DefaultValue = "0")]
public AuditStatusEnum? AuditStatus { get; set; } = AuditStatusEnum.Approve;
public AuditStatusEnum AuditStatus { get; set; } = AuditStatusEnum.Approve;
/// <summary>
/// 审批时间
/// </summary>
[SugarColumn(ColumnDescription = "审批时间", IsNullable = true)]
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审批意见
/// </summary>
[SugarColumn(ColumnDescription = "审批意见", Length = 100, IsNullable = true)]
public string AuditNote { get; set; }
public string? AuditNote { get; set; }
/// <summary>
/// Desc:默认付费方式
/// </summary>
[SugarColumn(ColumnDescription = "默认付费方式", Length = 20, IsNullable = true)]
public string FeeFRT { get; set; }
public string? FeeFRT { get; set; }
/// <summary>
/// Desc:业务来源Id
/// </summary>
@ -395,92 +389,91 @@ public class InfoClient : BaseModelV2<long>
/// Desc:发票银行
/// </summary>
[SugarColumn(ColumnDescription = "发票银行", Length = 150, IsNullable = true)]
public string InvoiceBank { get; set; }
public string? InvoiceBank { get; set; }
/// <summary>
/// Desc:发票地址电话
/// </summary>
[SugarColumn(ColumnDescription = "发票地址电话", Length = 200, IsNullable = true)]
public string InvoiceAddrTel { get; set; }
public string? InvoiceAddrTel { get; set; }
/// <summary>
/// Desc:所属分部
/// 所属分部
/// </summary>
[SugarColumn(ColumnDescription = "所属分部")]
public long? SaleOrgId { get; set; }
[SugarColumn(ColumnDescription = "所属分部", IsNullable = true)]
public string? SaleOrgId { get; set; }
/// <summary>
/// Desc:提成比例
/// </summary>
[SugarColumn(ColumnDescription = "提成比例", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal? CommissionRate { get; set; } = 0;
public decimal CommissionRate { get; set; } = 0;
/// <summary>
/// Desc:分成比例
/// </summary>
[SugarColumn(ColumnDescription = "分成比例", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal? ProportionRate { get; set; } = 0;
public decimal ProportionRate { get; set; } = 0;
/// <summary>
/// Desc:提成参与人
/// </summary>
[SugarColumn(ColumnDescription = "提成参与人", IsNullable = true)]
public long CommissionUserId { get; set; }
public long? CommissionUserId { get; set; }
/// <summary>
/// Desc:运输公司列表
/// </summary>
[SugarColumn(ColumnDescription = "运输公司列表", Length = 200, IsNullable = true)]
public string CarrierList { get; set; }
public string? CarrierList { get; set; }
/// <summary>
/// Desc:集装箱尺寸
/// </summary>
[SugarColumn(ColumnDescription = "集装箱尺寸", Length = 50, IsNullable = true)]
public string CtnType { get; set; }
public string? CtnType { get; set; }
/// <summary>
/// Desc: 客服
/// </summary>
[SugarColumn(ColumnDescription = "客服")]
public long CustomerService { get; set; } = 0;
public long CustomerService { get; set; }
/// <summary>
/// Desc:英文简称
/// </summary>
[SugarColumn(ColumnDescription = "英文简称", Length = 50, IsNullable = true)]
public string EnShortName { get; set; }
public string? EnShortName { get; set; }
/// <summary>
/// Desc:仓储费开始日期模式
/// </summary>
[SugarColumn(ColumnDescription = "仓储费开始日期模式", Length = 50, IsNullable = true)]
public string WMSFeeRateType { get; set; }
public string? WMSFeeRateType { get; set; }
/// <summary>
/// 揽货人名字
/// </summary>
[SugarColumn(ColumnDescription = "揽货人名字", Length = 50, IsNullable = true)]
public string SaleName { get; set; }
public string? SaleName { get; set; }
/// <summary>
/// 操作名字
/// </summary>
[SugarColumn(ColumnDescription = "操作名字", Length = 50, IsNullable = true)]
public string OpName { get; set; }
public string? OpName { get; set; }
/// <summary>
/// 单证名字
/// </summary>
[SugarColumn(ColumnDescription = "单证名字", Length = 50, IsNullable = true)]
public string DocName { get; set; }
public string? DocName { get; set; }
/// <summary>
/// 客服名字
/// </summary>
[SugarColumn(ColumnDescription = "客服名字", Length = 50, IsNullable = true)]
public string CustomerServiceName { get; set; }
public string? CustomerServiceName { get; set; }
/// <summary>
/// 是否共享

@ -16,137 +16,136 @@ public class InfoClientContact : BaseModelV2<long>
public long ClientId { get; set; }
/// <summary>
/// Desc:联系人代码
/// 姓名
/// </summary>
[SugarColumn(ColumnDescription = "联系人代码", Length = 6)]
public string CodeName { get; set; }
[SugarColumn(ColumnDescription = "姓名", Length = 20)]
public string Name { get; set; }
/// <summary>
/// Desc:联系人简称
/// 英文名
/// </summary>
[SugarColumn(ColumnDescription = "联系人简称", Length = 20)]
public string ShortName { get; set; }
[SugarColumn(ColumnDescription = "英文名", Length = 50, IsNullable = true)]
public string? EnName { get; set; }
/// <summary>
/// Desc:职务
/// </summary>
[SugarColumn(ColumnDescription = "职务", Length = 50, IsNullable = true)]
public string Job { get; set; }
[SugarColumn(ColumnDescription = "职务", Length = 500, IsNullable = true)]
public string? Job { get; set; }
/// <summary>
/// Desc:通讯地址
/// </summary>
[SugarColumn(ColumnDescription = "通讯地址", Length = 100, IsNullable = true)]
public string Address { get; set; }
public string? Address { get; set; }
/// <summary>
/// Desc:邮箱
/// </summary>
[SugarColumn(ColumnDescription = "邮箱", Length = 50, IsNullable = true)]
public string Email { get; set; }
public string? Email { get; set; }
/// <summary>
/// Desc:手机
/// </summary>
[SugarColumn(ColumnDescription = "手机", Length = 50, IsNullable = true)]
public string Mobile { get; set; }
public string? Mobile { get; set; }
/// <summary>
/// Desc:电话
/// </summary>
[SugarColumn(ColumnDescription = "电话", Length = 50, IsNullable = true)]
public string Tel { get; set; }
public string? Tel { get; set; }
/// <summary>
/// Desc:传真
/// </summary>
[SugarColumn(ColumnDescription = "传真", Length = 50, IsNullable = true)]
public string Fax { get; set; }
public string? Fax { get; set; }
/// <summary>
/// Desc:QQ
/// </summary>
[SugarColumn(ColumnDescription = "QQ", Length = 50, IsNullable = true)]
public string QQ { get; set; }
public string? QQ { get; set; }
/// <summary>
/// Desc:是否为操作
/// </summary>
[SugarColumn(ColumnDescription = "是否为操作",DefaultValue = "0")]
public bool? IsOperator { get; set; } = false;
[SugarColumn(ColumnDescription = "是否为操作", DefaultValue = "0")]
public bool IsOperator { get; set; }
/// <summary>
/// Desc:是否为财务
/// </summary>
[SugarColumn(ColumnDescription = "是否为财务",DefaultValue = "0")]
public bool? IsFinancialStaff { get; set; } = false;
[SugarColumn(ColumnDescription = "是否为财务", DefaultValue = "0")]
public bool IsFinancialStaff { get; set; }
/// <summary>
/// Desc:是否为销售
/// </summary>
[SugarColumn(ColumnDescription = "是否为销售",DefaultValue = "0")]
public bool? IsSaleMan { get; set; } = false;
[SugarColumn(ColumnDescription = "是否为销售", DefaultValue = "0")]
public bool IsSaleMan { get; set; }
/// <summary>
/// Desc:是否为其他
/// </summary>
[SugarColumn(ColumnDescription = "是否为其他",DefaultValue = "0")]
public bool? IsOther { get; set; } = false;
[SugarColumn(ColumnDescription = "是否为其他", DefaultValue = "0")]
public bool IsOther { get; set; }
/// <summary>
/// Desc:是否保险联系人
/// </summary>
[SugarColumn(ColumnDescription = "是否保险联系人",DefaultValue = "0")]
public bool? IsInsurance { get; set; } = false;
[SugarColumn(ColumnDescription = "是否保险联系人", DefaultValue = "0")]
public bool IsInsurance { get; set; }
/// <summary>
/// Desc:是否对账联系人
/// </summary>
[SugarColumn(ColumnDescription = "是否对账联系人",DefaultValue = "0")]
public bool? IsCheckAccount { get; set; } = false;
[SugarColumn(ColumnDescription = "是否对账联系人", DefaultValue = "0")]
public bool IsCheckAccount { get; set; }
/// <summary>
/// 提醒日期1
/// </summary>
[SugarColumn(ColumnDescription = "提醒日期1", IsNullable = true)]
public DateTime Anniversary1 { get; set; }
public DateTime? Anniversary1 { get; set; }
/// <summary>
/// 提醒日期2
/// </summary>
[SugarColumn(ColumnDescription = "提醒日期2", IsNullable = true)]
public DateTime Anniversary2 { get; set; }
public DateTime? Anniversary2 { get; set; }
/// <summary>
/// 提醒备注1
/// </summary>
[SugarColumn(ColumnDescription = "提醒备注1", Length = 200, IsNullable = true)]
public string AnniversaryNote1 { get; set; }
public string? AnniversaryNote1 { get; set; }
/// <summary>
/// 提醒备注2
/// </summary>
[SugarColumn(ColumnDescription = "提醒备注2", Length = 200, IsNullable = true)]
public string AnniversaryNote2 { get; set; }
public string? AnniversaryNote2 { get; set; }
/// <summary>
/// 状态 0启用 1禁用
/// </summary>
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
[SugarColumn(ColumnDescription = "状态", DefaultValue = "0")]
public StatusEnum Status { get; set; } = StatusEnum.Enable;
///// <summary>
///// 船公司Id
///// </summary>
//[SugarColumn(ColumnDescription = "船公司Id", IsNullable = true)]
//public long? CarrierId { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
[SugarColumn(ColumnDescription = "船公司Id", IsNullable = true, DefaultValue = "0")]
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
[SugarColumn(ColumnDescription = "船公司", IsNullable = true, Length = 100)]
public string Carrier { get; set; }
///// <summary>
///// 船公司
///// </summary>
//[SugarColumn(ColumnDescription = "船公司", IsNullable = true, Length = 100)]
//public string? Carrier { get; set; }
/// <summary>
/// 机构Id

@ -45,10 +45,10 @@ public class ClientContactService : ServiceBase, IClientContactService
{
if (req.Id == 0)
{
if (TenantDb.Queryable<InfoClientContact>().Where(x => x.CodeName == req.CodeName).Any())
{
return DataResult.Failed("客户联系人信息已存在!", MultiLanguageConst.ClientContactExist);
}
//if (TenantDb.Queryable<InfoClientContact>().Where(x => x.Name == req.Name).Any())
//{
// return DataResult.Failed("客户联系人信息已存在!", MultiLanguageConst.ClientContactExist);
//}
var data = req.Adapt<InfoClientContact>();

@ -7,6 +7,7 @@ using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Info.Interface;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using Mapster;
namespace DS.WMS.Core.Info.Method;
@ -34,11 +35,24 @@ public class ClientInfoService : ServiceBase, IClientInfoService
long orgId = User.OrgId;
//序列化查询条件
var whereList = request.GetConditionalModels(Db);
var data = TenantDb.Queryable<InfoClient>()
var result = TenantDb.Queryable<InfoClient>()
.Where(x => x.OrgId == orgId || x.IsShared)
.Where(whereList)
.Select<ClientInfoRes>().ToQueryPage(request.PageCondition);
return data;
if (result.Data?.Count > 0)
{
var ids = result.Data.SelectMany(x => x.SaleOrgIdList).Distinct();
var orgs = Db.Queryable<SysOrg>().Where(x => ids.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToList();
foreach (var item in result.Data)
{
var list = orgs.FindAll(x => item.SaleOrgIdList.Contains(x.Id));
item.SaleOrgNames = string.Join(",", list.Select(x => x.OrgName));
}
}
return result;
}
/// <summary>
@ -50,10 +64,10 @@ public class ClientInfoService : ServiceBase, IClientInfoService
{
if (req.Id == 0)
{
if (TenantDb.Queryable<InfoClient>().Where(x => x.CodeName == req.CodeName).Any())
{
return DataResult.Failed("客户信息已存在!", MultiLanguageConst.ClientInfoExist);
}
//if (TenantDb.Queryable<InfoClient>().Where(x => x.CodeName == req.CodeName).Any())
//{
// return DataResult.Failed("客户信息已存在!", MultiLanguageConst.ClientInfoExist);
//}
var data = req.Adapt<InfoClient>();
var tag = req.ClientTag.Adapt<InfoClientTag>();

@ -2502,7 +2502,7 @@ namespace DS.WMS.Core.Op.Method
{
bookingContact = new BusinessOrderContact
{
Name = djyCustomerContactMan.ShortName,
Name = djyCustomerContactMan.Name,
BusinessId = id,
Email = djyCustomerContactMan.Email,
Note = djyCustomerContactMan.Note,
@ -2516,7 +2516,7 @@ namespace DS.WMS.Core.Op.Method
}
else
{
bookingContact.Name = djyCustomerContactMan.ShortName;
bookingContact.Name = djyCustomerContactMan.Name;
bookingContact.Email = djyCustomerContactMan.Email;
bookingContact.Note = djyCustomerContactMan.Note;
bookingContact.UpdateTime = DateTime.Now;

@ -638,7 +638,7 @@ public partial class SeaExportService : ISeaExportService
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.CustomerId && x.IsOperator == true).First();
if (defaultContact.IsNotNull())
{
if (!contactLists.Where(x=>x.BusinessType == BusinessType.OceanShippingExport &&x.CustomerType == "controller"&& x.Name == defaultContact.ShortName).Any())
if (!contactLists.Where(x=>x.BusinessType == BusinessType.OceanShippingExport &&x.CustomerType == "controller"&& x.Name == defaultContact.Name).Any())
{
addList.Add(new BusinessOrderContact()
{
@ -647,7 +647,7 @@ public partial class SeaExportService : ISeaExportService
CustomerName = seaExport.CustomerName,
CustomerType = "controller",
CustomerTypeName="委托单位",
Name = defaultContact.ShortName,
Name = defaultContact.Name,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -660,7 +660,7 @@ public partial class SeaExportService : ISeaExportService
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.TruckerId && x.IsOperator == true).First();
if (defaultContact.IsNotNull())
{
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "truck" && x.Name == defaultContact.ShortName).Any())
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "truck" && x.Name == defaultContact.Name).Any())
{
addList.Add(new BusinessOrderContact()
{
@ -669,7 +669,7 @@ public partial class SeaExportService : ISeaExportService
CustomerName = seaExport.Trucker,
CustomerType = "truck",
CustomerTypeName = "车队",
Name = defaultContact.ShortName,
Name = defaultContact.Name,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -682,7 +682,7 @@ public partial class SeaExportService : ISeaExportService
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.YardId && x.IsOperator == true).First();
if (defaultContact.IsNotNull())
{
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "yard" && x.Name == defaultContact.ShortName).Any())
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "yard" && x.Name == defaultContact.Name).Any())
{
addList.Add(new BusinessOrderContact()
{
@ -691,7 +691,7 @@ public partial class SeaExportService : ISeaExportService
CustomerName = seaExport.Yard,
CustomerType = "yard",
CustomerTypeName = "场站",
Name = defaultContact.ShortName,
Name = defaultContact.Name,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -704,7 +704,7 @@ public partial class SeaExportService : ISeaExportService
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.ForwarderId && x.IsOperator == true).First();
if (defaultContact.IsNotNull())
{
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "booking" && x.Name == defaultContact.ShortName).Any())
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "booking" && x.Name == defaultContact.Name).Any())
{
addList.Add(new BusinessOrderContact()
{
@ -713,7 +713,7 @@ public partial class SeaExportService : ISeaExportService
CustomerName = seaExport.Forwarder,
CustomerType = "booking",
CustomerTypeName = "订舱公司",
Name = defaultContact.ShortName,
Name = defaultContact.Name,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id

@ -1016,7 +1016,7 @@ namespace DS.WMS.Core.TaskPlat.Method
{
bookingContact = new BusinessOrderContact
{
Name = djyCustomerContactMan.ShortName,
Name = djyCustomerContactMan.Name,
BusinessId = bookingOrderId,
Email = djyCustomerContactMan.Email,
Note = djyCustomerContactMan.Note,
@ -1030,7 +1030,7 @@ namespace DS.WMS.Core.TaskPlat.Method
}
else
{
bookingContact.Name = djyCustomerContactMan.ShortName;
bookingContact.Name = djyCustomerContactMan.Name;
bookingContact.Email = djyCustomerContactMan.Email;
bookingContact.Note = djyCustomerContactMan.Note;
bookingContact.UpdateTime = DateTime.Now;

Loading…
Cancel
Save