jianghaiqing 4 months ago
commit 1f9bd54a41

@ -191,46 +191,45 @@ namespace DS.Module.Core
#region 工作流--主要流程
/// <summary>
/// 审单
/// 审单
/// </summary>
[Description("审单")]
[Description("审单")]
WAIT_ORDER_AUDIT = 201,
/// <summary>
/// 订舱
/// 订舱
/// </summary>
[Description("订舱")]
[Description("订舱")]
WAIT_BOOKING = 202,
/// <summary>
/// 收BC
/// 收BC
/// </summary>
[Description("收BC")]
[Description("收BC")]
WAIT_BC = 203,
/// <summary>
/// 放舱
/// 放舱
/// </summary>
[Description("放舱")]
[Description("放舱")]
WAIT_SPACE_RELEASE = 204,
/// <summary>
/// 提单确认
/// 提单确认
/// </summary>
[Description("提单确认")]
[Description("提单确认")]
WAIT_BILL_CONFIRM = 205,
/// <summary>
/// 提交SI
/// 提交SI
/// </summary>
[Description("提交SI")]
[Description("提交SI")]
WAIT_SI = 206,
/// <summary>
/// 处理Draft
/// 处理Draft
/// </summary>
[Description("处理Draft")]
[Description("处理Draft")]
WAIT_DRAFT = 207,
/// <summary>
/// 放单
/// 放单
/// </summary>
[Description("放单")]
[Description("放单")]
WAIT_CHECKOUT_BILL = 208,
/// <summary>
/// 审单驳回
/// </summary>
@ -240,84 +239,84 @@ namespace DS.Module.Core
#region 工作流--可选服务项目
/// <summary>
/// 报关
/// 报关
/// </summary>
[Description("报关")]
[Description("报关")]
WAIT_BAOGUAN = 301,
/// <summary>
/// 发舱单
/// 发舱单
/// </summary>
[Description("发舱单")]
[Description("发舱单")]
WAIT_CANGDAN = 302,
/// <summary>
/// 提交VGM
/// 提交VGM
/// </summary>
[Description("提交VGM")]
[Description("提交VGM")]
WAIT_VGM = 303,
/// <summary>
/// 发AFR
/// 发AFR
/// </summary>
[Description("发AFR")]
[Description("发AFR")]
WAIT_AFR = 304,
/// <summary>
/// 发AMS
/// 发AMS
/// </summary>
[Description("发AMS")]
[Description("发AMS")]
WAIT_AMS = 305,
/// <summary>
/// 发ISF
/// 发ISF
/// </summary>
[Description("发ISF")]
[Description("发ISF")]
WAIT_ISF = 306,
/// <summary>
/// 熏蒸
/// 熏蒸
/// </summary>
[Description("熏蒸")]
[Description("熏蒸")]
WAIT_XUNZHENG = 307,
/// <summary>
/// 报商检
/// 报商检
/// </summary>
[Description("报商检")]
[Description("报商检")]
WAIT_SHANGJIAN = 308,
/// <summary>
/// 报COA
/// 报COA
/// </summary>
[Description("报COA")]
[Description("报COA")]
WAIT_COA = 309,
/// <summary>
/// 出产地证
/// 出产地证
/// </summary>
[Description("出产地证")]
[Description("出产地证")]
WAIT_CHANDIZHENG = 310,
/// <summary>
/// 拖车
/// 拖车
/// </summary>
[Description("拖车")]
[Description("拖车")]
WAIT_TUOCHE = 311,
/// <summary>
/// 办保险
/// 办保险
/// </summary>
[Description("办保险")]
[Description("办保险")]
WAIT_Insurance = 312,
/// <summary>
/// 出号
/// 出号
/// </summary>
[Description("出号")]
[Description("出号")]
WAIT_CHUHAO = 313,
/// <summary>
/// 内点入货
/// 内点入货
/// </summary>
[Description("内点入货")]
[Description("内点入货")]
WAIT_NDRH = 314,
/// <summary>
/// 发快递
/// 发快递
/// </summary>
[Description("发快递")]
[Description("发快递")]
WAIT_DELIVERY = 315,
/// <summary>
/// 箱使
/// 箱使
/// </summary>
[Description("箱使")]
[Description("箱使")]
WAIT_XIANGSHI = 316,
#endregion
}

@ -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>();

@ -0,0 +1,63 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
public class OpBusinessLogRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务id
/// </summary>
public long? BusinessId { get; set; }
/// <summary>
/// 操作方式:新增(Create)、更新(Update)、删除(Delete)
/// </summary>
public string OperateType { get; set; }
/// <summary>
/// 旧值
/// </summary>
public string OldValue { get; set; }
/// <summary>
/// 新值
/// </summary>
public string NewValue { get; set; }
/// <summary>
/// 差异数据
/// </summary>
public string DiffData { get; set; }
/// <summary>
/// 业务来源代码
/// </summary>
public string SourceCode { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public string SourceName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Description("创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人名称
/// </summary>
[Description("创建人名称")]
public string CreateUserName { get; set; }
}
}

@ -195,39 +195,5 @@ namespace DS.WMS.Core.Op.Dtos
public string CNPTNo { get; set; }
/// <summary>
/// 装运方式代码 整箱、拼箱单票、拼箱主票、拼箱分票代码
/// </summary>
public string BLTypeCode { get; set; }
/// <summary>
/// Desc:结算方式代码
/// </summary>
public string StlCode { get; set; }
/// <summary>
/// Desc:贸易方式代码
/// </summary>
public string TermDeliveryCdoe { get; set; }
/// <summary>
/// Desc:贸易条款代码
/// </summary>
public string TradeTermCode { get; set; }
/// <summary>
/// 签单方式代码 t_code_issutype
/// </summary>
public string IssueTypeCode { get; set; }
/// <summary>
/// Desc:MBL付费方式代码 t_code_frt
/// </summary>
public string MBLFrtCode { get; set; }
/// <summary>
/// 运输条款代码 CY-CY t_code_service
/// </summary>
public string ServiceCode { get; set; }
}
}

@ -189,44 +189,6 @@ namespace DS.WMS.Core.Op.Dtos
/// </summary>
public string EmcNameAccount { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
/// <summary>
/// 装运方式代码 整箱、拼箱单票、拼箱主票、拼箱分票代码
/// </summary>
public string BLTypeCode { get; set; }
/// <summary>
/// Desc:结算方式代码
/// </summary>
public string StlCode { get; set; }
/// <summary>
/// Desc:贸易方式代码
/// </summary>
public string TermDeliveryCdoe { get; set; }
/// <summary>
/// Desc:贸易条款代码
/// </summary>
public string TradeTermCode { get; set; }
/// <summary>
/// 签单方式代码 t_code_issutype
/// </summary>
public string IssueTypeCode { get; set; }
/// <summary>
/// Desc:MBL付费方式代码 t_code_frt
/// </summary>
public string MBLFrtCode { get; set; }
/// <summary>
/// 运输条款代码 CY-CY t_code_service
/// </summary>
public string ServiceCode { get; set; }
}
}

@ -1079,6 +1079,42 @@ public class SeaExportReq
/// 国内发货人 t_info_client CUSTNAME
/// </summary>
public string ShipperCn { get; set; }
/// <summary>
/// 装运方式代码 整箱、拼箱单票、拼箱主票、拼箱分票代码
/// </summary>
public string BLTypeCode { get; set; }
/// <summary>
/// Desc:结算方式代码
/// </summary>
public string StlCode { get; set; }
/// <summary>
/// Desc:贸易方式代码
/// </summary>
public string TermDeliveryCdoe { get; set; }
/// <summary>
/// Desc:贸易条款代码
/// </summary>
public string TradeTermCode { get; set; }
/// <summary>
/// 签单方式代码 t_code_issutype
/// </summary>
public string IssueTypeCode { get; set; }
/// <summary>
/// Desc:MBL付费方式代码 t_code_frt
/// </summary>
public string MBLFrtCode { get; set; }
/// <summary>
/// 运输条款代码 CY-CY t_code_service
/// </summary>
public string ServiceCode { get; set; }
}
/// <summary>

@ -1271,4 +1271,44 @@ public class SeaExportRes
/// 最后格式单比对时间
/// </summary>
public Nullable<DateTime> LstDraftCompareDate { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
/// <summary>
/// 装运方式代码 整箱、拼箱单票、拼箱主票、拼箱分票代码
/// </summary>
public string BLTypeCode { get; set; }
/// <summary>
/// Desc:结算方式代码
/// </summary>
public string StlCode { get; set; }
/// <summary>
/// Desc:贸易方式代码
/// </summary>
public string TermDeliveryCdoe { get; set; }
/// <summary>
/// Desc:贸易条款代码
/// </summary>
public string TradeTermCode { get; set; }
/// <summary>
/// 签单方式代码 t_code_issutype
/// </summary>
public string IssueTypeCode { get; set; }
/// <summary>
/// Desc:MBL付费方式代码 t_code_frt
/// </summary>
public string MBLFrtCode { get; set; }
/// <summary>
/// 运输条款代码 CY-CY t_code_service
/// </summary>
public string ServiceCode { get; set; }
}

@ -50,6 +50,11 @@ namespace DS.WMS.Core.Op.Dtos
/// 类型 1 收 2 发 3 通
/// </summary>
public string Type { get; set; }
/// <summary>
/// 模板内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// 备注
/// </summary>

@ -19,7 +19,7 @@ namespace DS.WMS.Core.Op.Interface
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public Task SaveSeaExportLog(SeaExportSaveLog req);
public Task SaveSeaExportLogAsync(SeaExportSaveLog req, SqlSugarScopeProvider tenantDb);
/// <summary>
/// 获取第三方账户
/// </summary>

@ -43,7 +43,7 @@ public interface ISeaExportService
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
DataResult SeaExportBatchEdit(SeaExportBatchEditReq req);
Task<DataResult> SeaExportBatchEdit(SeaExportBatchEditReq req);
/// <summary>
/// 业务单据删除
@ -219,4 +219,11 @@ public interface ISeaExportService
/// <param name="id"></param>
/// <returns></returns>
public Task<DataResult> PrintShippingOrderLetterPDF(string id);
/// <summary>
/// 获取海运出口日志
/// </summary>
/// <param name="id">业务Id</param>
/// <returns></returns>
public Task<DataResult<List<OpBusinessLogRes>>> GetSeaExportLogList(string id);
}

@ -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;

@ -366,6 +366,7 @@ namespace DS.WMS.Core.Op.Method
if (config.IsNotNull() && config.Value == "YES")
{
var order = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == businessId && x.MBLNO == item.MBLNO).FirstAsync();
var oldOrder = order.Adapt<SeaExport>();
if (item.Status == "ATD")
{
//2023-8-31排查单号为177GZHZHQ5711V的数据原来录入的船已开船运踪港前不再查询而因订阅港后数据会继续回推数据所以导致ATD被改
@ -377,12 +378,20 @@ namespace DS.WMS.Core.Op.Method
if (order != null && item.OpTime != null && order.ATD != item.OpTime)
{
order.ATD = item.OpTime;
order.Note = "运踪回调更新ATD";
//order.Note = "运踪回调更新ATD";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.ATD,
x.Note
x.ATD
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteATD",
SourceName = "运踪回调更新ATD",
}, tenantDb);
//sendDsList.Add(item.BookingId);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}
@ -416,11 +425,20 @@ namespace DS.WMS.Core.Op.Method
if (order != null && item.OpTime != null && order.YgtETD != item.OpTime)
{
order.YgtETD = item.OpTime;
order.Note = "运踪回调更新YgtETD";
//order.Note = "运踪回调更新YgtETD";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.YgtETD,x.Note
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteYgtETD",
SourceName = "运踪回调更新YgtETD",
}, tenantDb);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}
}
@ -429,11 +447,20 @@ namespace DS.WMS.Core.Op.Method
if (order != null && item.OpTime != null && order.StartATA != item.OpTime)
{
order.StartATA = item.OpTime;
order.Note = "运踪回调更新StartATA";
//order.Note = "运踪回调更新StartATA";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.StartATA, x.Note
x.StartATA
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteStartATA",
SourceName = "运踪回调更新StartATA",
}, tenantDb);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}
}
@ -442,11 +469,20 @@ namespace DS.WMS.Core.Op.Method
if (order != null && item.OpTime != null && order.StartETA != item.OpTime)
{
order.StartETA = item.OpTime;
order.Note = "运踪回调更新StartETA";
//order.Note = "运踪回调更新StartETA";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.StartETA,x.Note
x.StartETA
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteStartETA",
SourceName = "运踪回调更新StartETA",
}, tenantDb);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}
}
@ -455,11 +491,20 @@ namespace DS.WMS.Core.Op.Method
if (order != null && item.OpTime != null && order.ETA != item.OpTime)
{
order.ETA = item.OpTime;
order.Note = "运踪回调更新ETA";
//order.Note = "运踪回调更新ETA";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.ETA,x.Note
x.ETA
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteMDGETA",
SourceName = "运踪回调更新ETA",
}, tenantDb);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}
@ -467,13 +512,22 @@ namespace DS.WMS.Core.Op.Method
else if (item.Status == "MDGATA")
{
if (order != null && item.OpTime != null && order.ATA != item.OpTime)
{
{
order.ATA = item.OpTime;
order.Note = "运踪回调更新ATA";
//order.Note = "运踪回调更新ATA";
await tenantDb.Updateable(order).UpdateColumns(x => new
{
x.ATA,x.Note
x.ATA
}).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "TraceUpdteMDGATA",
SourceName = "运踪更新船期ATA",
}, tenantDb);
//await _bookingorderservice.SaveLog(newOrder, oldOrder, "运踪更新船期");
}

@ -26,6 +26,9 @@ using System.Text;
using System.Text.RegularExpressions;
using Logger = NLog.Logger;
using AnyDiff.Extensions;
using static AnyDiff.DifferenceLines;
using Newtonsoft.Json;
using Masuit.Tools.Hardware;
namespace DS.WMS.Core.Op.Method
{
@ -53,6 +56,7 @@ namespace DS.WMS.Core.Op.Method
_environment = _serviceProvider.GetRequiredService<IWebHostEnvironment>();
}
#region 海运出口差异日志
/// <summary>
/// 忽略的字段
/// </summary>
@ -70,63 +74,42 @@ namespace DS.WMS.Core.Op.Method
"TenantId",
"TenantName",
};
public async Task SaveSeaExportLog(SeaExportSaveLog req) {
bool flag = true;
long bid = 0;
public async Task SaveSeaExportLogAsync(SeaExportSaveLog req, SqlSugarScopeProvider tenantDb)
{
var diff = req.NewOrder.Diff(req.OldOrder);
//var obj1 = new { Name = "Tom", Age = 20 };
//var obj2 = new { Name = "Jerry", Age = 21 };
//var diff = obj1.Diff(obj2).ToList();
foreach (var change in diff)
{
Console.WriteLine($"{change.PropertyType} - {change.Property}: {change.LeftValue} => {change.RightValue}");
}
//foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(req.NewOrder))
//{
// //基础字段不记录
// string name = descriptor.Name;
// if (IgnoreColumns.Contains(name))
// {
// continue;
// }
// // 如果已经明确了被修改的字段,且当前字段不在其中,则跳过
// if (req.UpdateFields.IsNotNull() && !req.UpdateFields.Contains(name))
// {
// continue;
// }
// object value = descriptor.GetValue(req.NewOrder);
// var oldvalue = req.OldOrder.GetType().GetProperty(name).GetValue(req.OldOrder, null);
// //数值类型转换比较
// if (name == "KGS" || name == "CBM")
// {
// if (Convert.ToDecimal(value) == Convert.ToDecimal(oldvalue))
// {
// continue;
// }
// }
// string _oldvalue = oldvalue != null ? oldvalue.ToString() : "";
// string _value = value != null ? value.ToString() : "";
// if (_oldvalue != _value && !string.IsNullOrWhiteSpace(descriptor.Description))
// {
// var data = new OpBusinessLog()
// {
// BusinessId = req.OldOrder.Id,
// OldValue = JsonConvert.SerializeObject(req.OldOrder),
// NewValue= JsonConvert.SerializeObject(req.NewOrder),
// };
// }
//}
StringBuilder sb = new StringBuilder();
foreach (var item in diff)
{
Console.WriteLine($"{item.PropertyType} - {item.Property}: {item.LeftValue} => {item.RightValue}");
if (item.LeftValue.IsNotNull() && item.RightValue.IsNotNull())
{
if (IgnoreColumns.Contains(item.Property))
continue;
if (!item.LeftValue.Equals(item.RightValue))
{
sb.Append($"[字段:{item.Property},修改前:{item.LeftValue},修改后:{item.RightValue}]");
}
}
}
}
var log = new OpBusinessLog()
{
BusinessId = req.NewOrder.Id,
OperateType = "Update",
OldValue = JsonConvert.SerializeObject(req.OldOrder),
NewValue = JsonConvert.SerializeObject(req.NewOrder),
DiffData = sb.ToString(),
SourceCode = req.SourceCode,
SourceName = req.SourceName,
};
await tenantDb.Insertable(log).ExecuteCommandAsync();
}
#endregion
#region 获取客户结算方式及结算日期
public DataResult<CustomerStlRes> GetCustomerStlInfo(CustomerStlReq req)
@ -951,10 +934,19 @@ namespace DS.WMS.Core.Op.Method
{
StatusName = "";
}
var oldOrder = order.Adapt<SeaExport>();
order.BusinessStatusName = StatusName;
order.Note = "更新主单货物状态";
//order.Note = "更新主单货物状态";
await tenantDb.Updateable(order).EnableDiffLogEvent().ExecuteCommandAsync();
// 记录日志
await SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = order,
SourceCode = "UpdteBusinessStatusName",
SourceName = "自动更新货物状态",
}, tenantDb);
//var newOrder = order.Adapt<SeaExport>();
//newOrder.BSSTATUSNAME = StatusName;
//await SaveLog(newOrder, order, "自动更新货物状态");
@ -2089,7 +2081,7 @@ namespace DS.WMS.Core.Op.Method
{
return await Task.FromResult(DataResult.Failed("海运出口信息业务已锁定!", MultiLanguageConst.SeaExportBusinessLock));
}
var oldOrder = order.Adapt<SeaExport>();
var dic = req.GetPropertiesArray();
var info = req.Adapt(order);
info.Note = "对外开放更新接口";
@ -2120,7 +2112,14 @@ namespace DS.WMS.Core.Op.Method
}
#endregion
await tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommandAsync();
await SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = info,
SourceCode = "OpenEdit",
SourceName = "开放对接更新",
}, tenantDb);
return await Task.FromResult(DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess));
}

@ -415,6 +415,21 @@ public partial class SeaExportService : ISeaExportService
return result;
}
/// <summary>
/// 获取海运出口日志
/// </summary>
/// <param name="id">业务Id</param>
/// <returns></returns>
public async Task<DataResult<List<OpBusinessLogRes>>> GetSeaExportLogList(string id) {
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = await tenantDb.Queryable<OpBusinessLog>()
.Where(a => a.BusinessId == long.Parse(id))
.Select<OpBusinessLogRes>()
.ToListAsync();
return await Task.FromResult(DataResult<List<OpBusinessLogRes>>.Success(data, MultiLanguageConst.DataQuerySuccess));
}
/// <summary>
/// 编辑
/// </summary>
@ -514,14 +529,14 @@ public partial class SeaExportService : ISeaExportService
//添加操作权限
var operationRule = commonService.GetOperationRuleConditional<SeaExport>();
var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == req.Id).WhereFilterOperationRule(operationRule).FirstAsync();
var oldOrder = info.Adapt<SeaExport>();
var feeStatus = await tenantDb.Queryable<BusinessFeeStatus>().Where(x => x.BusinessId == req.Id).FirstAsync();
if (feeStatus.IsNotNull() && (bool)feeStatus.IsBusinessLocking)
{
return await Task.FromResult(DataResult.Failed("海运出口信息业务已锁定!", MultiLanguageConst.SeaExportBusinessLock));
}
var oldOrder = info;
info = req.Adapt(info);
info= req.Adapt(info);
//TODO 会计期间不允许小于已结转期间
if (info.CloseDocDate.IsNotNull() && info.CloseDocDate > info.ETD)
{
@ -556,14 +571,14 @@ public partial class SeaExportService : ISeaExportService
info.Note = "正常编辑";
await tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommandAsync();
await seaComService.SaveSeaExportLog(new SeaExportSaveLog()
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = info,
SourceCode = "NormalEdit",
SourceName = "正常编辑",
});
},tenantDb);
//处理订单联系人信息
DealBusinessOrderContact(info, tenantDb);
@ -638,7 +653,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 +662,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 +675,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 +684,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 +697,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 +706,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 +719,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 +728,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
@ -752,7 +767,7 @@ public partial class SeaExportService : ISeaExportService
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult SeaExportBatchEdit(SeaExportBatchEditReq req)
public async Task<DataResult> SeaExportBatchEdit(SeaExportBatchEditReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Ids.Count == 0)
@ -775,15 +790,25 @@ public partial class SeaExportService : ISeaExportService
return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock);
}
}
var orderList = tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)).ToList();
var orderList = await tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)).ToListAsync();
var dic = req.GetPropertiesArray();
foreach (var item in orderList)
{
var oldOrder = item.Adapt<SeaExport>();
var info = req.Adapt(item);
info.Note = "批量更新";
tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommand();
await tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommandAsync();
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = info,
SourceCode = "BatchEdit",
SourceName = "批量更新",
}, tenantDb);
}
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);

@ -2,10 +2,30 @@
namespace DS.WMS.Core.Sys.Dtos
{
/// <summary>
/// 任务台字段自定义列查询接口的入参Dto
/// </summary>
public class SysFieldSetTaskPlatQueryDto
{
/// <summary>
///
/// </summary>
public string PermissionId { get; set; }
/// <summary>
/// 是否获取默认配置 false如果存在个人配置优先获取个人配置否则获取默认配置 true仅获取默认配置
/// </summary>
public bool IsGetDefault { get; set; }
/// <summary>
/// 任务类型Code数组
/// </summary>
public string[] TaskTypeCodeArray { get; set; }
}
/// <summary>
/// 任务台字段自定义列查询接口的返回Dto
/// </summary>
public class SysFieldSetTaskPlatQueryDtos: SysFieldSet
public class SysFieldSetTaskPlatResultDto: SysFieldSet
{
/// <summary>
/// 任务类型Code

@ -282,8 +282,5 @@ public interface ICommonService
/// <summary>
/// 批量获取任务台用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="isGetDefault">是否获取默认配置 false仅获取默认配置 true如果存在个人配置优先获取个人配置否则获取默认配置</param>
/// <param name="taskTypeCodeArray">任务类型Code</param>
Task<DataResult<List<SysFieldSetTaskPlatQueryDtos>>> GetUserTaskPlatFieldSet(string permissionId, bool isGetDefault, string[] taskTypeCodeArray);
Task<DataResult<List<SysFieldSetTaskPlatResultDto>>> GetUserTaskPlatFieldSet(SysFieldSetTaskPlatQueryDto query);
}

@ -1427,21 +1427,18 @@ public class CommonService : ICommonService
/// <summary>
/// 批量获取任务台用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="isGetDefault">是否获取默认配置 false仅获取默认配置 true如果存在个人配置优先获取个人配置否则获取默认配置</param>
/// <param name="taskTypeCodeArray">任务类型Code</param>
/// <returns></returns>
public async Task<DataResult<List<SysFieldSetTaskPlatQueryDtos>>> GetUserTaskPlatFieldSet(string permissionId, bool isGetDefault, string[] taskTypeCodeArray)
public async Task<DataResult<List<SysFieldSetTaskPlatResultDto>>> GetUserTaskPlatFieldSet(SysFieldSetTaskPlatQueryDto query)
{
if (taskTypeCodeArray == null || taskTypeCodeArray.Length == 0)
if (query.TaskTypeCodeArray == null || query.TaskTypeCodeArray.Length == 0)
{
return DataResult<List<SysFieldSetTaskPlatQueryDtos>>.Success(null);
return DataResult<List<SysFieldSetTaskPlatResultDto>>.Success(null);
}
long userId = long.Parse(user.UserId);
Dictionary<int, string> tagNoDic = new(taskTypeCodeArray.Length);
Dictionary<int, string> tagNoDic = new(query.TaskTypeCodeArray.Length);
foreach (var item in taskTypeCodeArray)
foreach (var item in query.TaskTypeCodeArray)
{
if (item.ToUpper() == TASK_PLAT_BASIC_CODE)
{
@ -1465,13 +1462,13 @@ public class CommonService : ICommonService
}
var tagNoList = tagNoDic.Select(x => x.Key);
var infoList = await db.Queryable<SysFieldSet>()
.Where(x => x.PermissionId == long.Parse(permissionId) && tagNoList.Contains(x.TagNo))
.WhereIF(isGetDefault, x => x.UserId == 0)
.WhereIF(!isGetDefault, x => (x.UserId == userId || x.UserId == 0))
.Select(x => new SysFieldSetTaskPlatQueryDtos(), true)
.Where(x => x.PermissionId == long.Parse(query.PermissionId) && tagNoList.Contains(x.TagNo))
.WhereIF(query.IsGetDefault, x => x.UserId == 0)
.WhereIF(!query.IsGetDefault, x => (x.UserId == userId || x.UserId == 0))
.Select(x => new SysFieldSetTaskPlatResultDto(), true)
.ToListAsync();
var result = new List<SysFieldSetTaskPlatQueryDtos>();
var result = new List<SysFieldSetTaskPlatResultDto>();
foreach (var item in tagNoDic)
{
var temp = infoList.FirstOrDefault(x => x.TagNo == item.Key && x.UserId == userId);
@ -1494,7 +1491,7 @@ public class CommonService : ICommonService
}
}
return DataResult<List<SysFieldSetTaskPlatQueryDtos>>.Success(result);
return DataResult<List<SysFieldSetTaskPlatResultDto>>.Success(result);
}
/// <summary>

@ -68,7 +68,7 @@ namespace DS.WMS.Core.TaskPlat.Method
//自动转发是否默认抄送操作
const string CONST_AUTO_TRANS_EMAIL_OP_CCTO = "AUTO_TRANS_EMAIL_OP_CCTO";
public TaskManageBCService(IUser user,
ILogger<TaskManageBCService> logger,
@ -192,6 +192,7 @@ namespace DS.WMS.Core.TaskPlat.Method
//}
//推送订舱订单
model.SlotId = bookingSlot.Id;
var bookingOrderId = await bookingSlotService.Value.GenerateBookingOrder(bookingSlot, slotFileList, model, null);
logger.LogInformation($"生成订舱订单完成bookingOrderId={bookingOrderId} taskid={bcOrder.TASK_ID}");
@ -256,59 +257,7 @@ namespace DS.WMS.Core.TaskPlat.Method
throw new Exception($"未获取有效任务记录,更新失败");
}
#region 更新任务
//如果是公共任务,需要变成个人任务 RealUserId = 当前操作人
if (taskEntity.IS_PUBLIC == 1)
{
taskEntity.IS_PUBLIC = 0;
taskEntity.RealUserId = long.Parse(user.UserId);
taskEntity.RealUserName = user.UserName;
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = taskEntity.RealUserId ?? 0;
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.IS_PUBLIC,
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.RealUserId,
it.RealUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
else
{
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = long.Parse(user.UserId);
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
#endregion
//var currBCOrder = await tenantDb.Queryable<TaskBaseInfo>().Where(a => a.Id == bcEntity.Id).FirstAsync();
//if (currBCOrder != null && model.IsDirectSend)
@ -357,6 +306,7 @@ namespace DS.WMS.Core.TaskPlat.Method
//{
// bookingSlotService = serviceProvider.GetRequiredService<IBookingSlotService>();
//}
model.SlotId = bookingSlot.Id;
var bookingOrderId = await bookingSlotService.Value.GenerateBookingOrder(bookingSlot, slotFileList, model, null);
logger.LogInformation($"生成订舱订单完成bookingOrderId={bookingOrderId} taskid={bcOrder.TASK_ID}");
@ -421,60 +371,6 @@ namespace DS.WMS.Core.TaskPlat.Method
throw new Exception($"未获取有效任务记录,更新失败");
}
#region 更新任务
//如果是公共任务,需要变成个人任务 RealUserId = 当前操作人
if (taskEntity.IS_PUBLIC == 1)
{
taskEntity.IS_PUBLIC = 0;
taskEntity.RealUserId = long.Parse(user.UserId);
taskEntity.RealUserName = user.UserName;
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = taskEntity.RealUserId ?? 0;
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.IS_PUBLIC,
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.RealUserId,
it.RealUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
else
{
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = long.Parse(user.UserId);
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
#endregion
//var currBCOrder = _taskBCInfoRepository.AsQueryable().First(a => a.PK_ID == bcEntity.PK_ID);
//if (currBCOrder != null && model.IsDirectSend)
@ -530,51 +426,6 @@ namespace DS.WMS.Core.TaskPlat.Method
}).ExecuteCommandAsync();
var taskEntity = await tenantDb.Queryable<TaskBaseInfo>().FirstAsync(u => u.Id == bcEntity.TASK_ID);
if (taskEntity == null)
{
throw new Exception($"未获取有效任务记录,更新失败");
}
#region 更新任务
//如果是公共任务,需要变成个人任务 RealUserId = 当前操作人
if (taskEntity.IS_PUBLIC == 1)
{
taskEntity.IS_PUBLIC = 0;
taskEntity.RealUserId = long.Parse(user.UserId);
taskEntity.RealUserName = user.UserName;
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = taskEntity.RealUserId ?? 0;
taskEntity.UpdateUserName = user.UserName;
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.IS_PUBLIC,
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.RealUserId,
it.RealUserName,
}).ExecuteCommandAsync();
}
else
{
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = long.Parse(user.UserId);
taskEntity.UpdateUserName = user.UserName;
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
}).ExecuteCommandAsync();
}
#endregion
#endregion
}
else if (model.GenerateMethod == "UPD_BOOKING")
@ -611,59 +462,6 @@ namespace DS.WMS.Core.TaskPlat.Method
throw new Exception($"未获取有效任务记录,更新失败");
}
#region 更新任务
//如果是公共任务,需要变成个人任务 RealUserId = 当前操作人
if (taskEntity.IS_PUBLIC == 1)
{
taskEntity.IS_PUBLIC = 0;
taskEntity.RealUserId = long.Parse(user.UserId);
taskEntity.RealUserName = user.UserName;
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = taskEntity.RealUserId ?? 0;
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.IS_PUBLIC,
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.RealUserId,
it.RealUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
else
{
taskEntity.UpdateTime = DateTime.Now;
taskEntity.UpdateBy = long.Parse(user.UserId);
taskEntity.UpdateUserName = user.UserName;
taskEntity.IS_COMPLETE = 1;
taskEntity.COMPLETE_DATE = DateTime.Now;
taskEntity.COMPLETE_DEAL = "MANUAL";
taskEntity.COMPLETE_DEAL = "手工";
await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
{
it.UpdateTime,
it.UpdateBy,
it.UpdateUserName,
it.IS_COMPLETE,
it.COMPLETE_DATE,
it.COMPLETE_DEAL,
it.COMPLETE_DEAL_NAME
}).ExecuteCommandAsync();
}
#endregion
//var currBCOrder = await tenantDb.Queryable<TaskBaseInfo>().Where(a => a.Id == bcEntity.Id).FirstAsync();
//if (currBCOrder != null && model.IsDirectSend)
@ -679,6 +477,64 @@ namespace DS.WMS.Core.TaskPlat.Method
#endregion
}
#region 更新任务
//var taskEntity = await tenantDb.Queryable<TaskBaseInfo>().FirstAsync(u => u.Id == bcEntity.TASK_ID);
//if (taskEntity == null)
//{
// throw new Exception($"未获取有效任务记录,更新失败");
//}
////如果是公共任务,需要变成个人任务 RealUserId = 当前操作人
//if (taskEntity.IS_PUBLIC == 1)
//{
// taskEntity.IS_PUBLIC = 0;
// taskEntity.RealUserId = long.Parse(user.UserId);
// taskEntity.RealUserName = user.UserName;
// taskEntity.UpdateTime = DateTime.Now;
// taskEntity.UpdateBy = taskEntity.RealUserId ?? 0;
// taskEntity.UpdateUserName = user.UserName;
// taskEntity.IS_COMPLETE = 1;
// taskEntity.COMPLETE_DATE = DateTime.Now;
// taskEntity.COMPLETE_DEAL = "MANUAL";
// taskEntity.COMPLETE_DEAL = "手工";
// await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
// {
// it.IS_PUBLIC,
// it.UpdateTime,
// it.UpdateBy,
// it.UpdateUserName,
// it.RealUserId,
// it.RealUserName,
// it.IS_COMPLETE,
// it.COMPLETE_DATE,
// it.COMPLETE_DEAL,
// it.COMPLETE_DEAL_NAME
// }).ExecuteCommandAsync();
//}
//else
//{
// taskEntity.UpdateTime = DateTime.Now;
// taskEntity.UpdateBy = long.Parse(user.UserId);
// taskEntity.UpdateUserName = user.UserName;
// taskEntity.IS_COMPLETE = 1;
// taskEntity.COMPLETE_DATE = DateTime.Now;
// taskEntity.COMPLETE_DEAL = "MANUAL";
// taskEntity.COMPLETE_DEAL = "手工";
// await tenantDb.Updateable(taskEntity).UpdateColumns(it => new
// {
// it.UpdateTime,
// it.UpdateBy,
// it.UpdateUserName,
// it.IS_COMPLETE,
// it.COMPLETE_DATE,
// it.COMPLETE_DEAL,
// it.COMPLETE_DEAL_NAME
// }).ExecuteCommandAsync();
//}
#endregion
result.succ = true;
result.msg = "成功";
@ -1021,7 +877,7 @@ namespace DS.WMS.Core.TaskPlat.Method
BookingOrSlotGenerateDto generateModel,
SqlSugarScopeProvider? tenantDb = null)
{
long id = 0;
//long id = 0;
if (tenantDb == null)
{
@ -1110,7 +966,10 @@ namespace DS.WMS.Core.TaskPlat.Method
var bkRlt = await seaExportService.Value.EditSeaExport(bkModel);
id = long.Parse(bkRlt.Data.ToString());
if (!bkRlt.Succeeded)
{
throw new Exception(MultiLanguageConst.GetDescription(MultiLanguageConst.DataUpdateFailed) + "" + bkRlt.Message);
}
string batchNo = Guid.NewGuid().ToString();
@ -1133,7 +992,7 @@ namespace DS.WMS.Core.TaskPlat.Method
if (generateModel.CustomerContactList != null && generateModel.CustomerContactList.Count > 0)
{
var bookingContactList = await tenantDb.Queryable<BusinessOrderContact>()
.Where(a => a.BusinessId == id && a.Deleted == false).ToListAsync();
.Where(a => a.BusinessId == bookingOrderId && a.Deleted == false).ToListAsync();
var djyCustomerInfo = clientInfoService.GetClientInfoWithContact(new Info.Dtos.QueryClientInfo { ClientId = generateModel.CustomerId.Value, IsController = true })
.GetAwaiter().GetResult().Data;
@ -1157,8 +1016,8 @@ namespace DS.WMS.Core.TaskPlat.Method
{
bookingContact = new BusinessOrderContact
{
Name = djyCustomerContactMan.ShortName,
BusinessId = id,
Name = djyCustomerContactMan.Name,
BusinessId = bookingOrderId,
Email = djyCustomerContactMan.Email,
Note = djyCustomerContactMan.Note,
CreateTime = DateTime.Now,
@ -1171,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;
@ -1198,14 +1057,14 @@ namespace DS.WMS.Core.TaskPlat.Method
//写入服务项目
var prjRlt = djyServiceStatusService.Value.SaveServiceProject(new EmbedServiceProjectDto
{
BusinessId = id.ToString(),
BusinessId = bookingOrderId.ToString(),
ProjectCodes = generateModel.ProjectList.Distinct().ToArray(),
});
logger.LogInformation($"推送订舱的服务项目完成 id={id} rlt={JsonConvert.SerializeObject(prjRlt)}");
logger.LogInformation($"推送订舱的服务项目完成 id={bookingOrderId} rlt={JsonConvert.SerializeObject(prjRlt)}");
}
logger.LogInformation($"任务BC MBLNO:{bookingSlotBase.SlotBookingNo} 生成订舱成功 id={id}");
logger.LogInformation($"任务BC MBLNO:{bookingSlotBase.SlotBookingNo} 生成订舱成功 id={bookingOrderId}");
}
catch (Exception ex)
@ -1214,7 +1073,7 @@ namespace DS.WMS.Core.TaskPlat.Method
}
return id;
return bookingOrderId;
}
#endregion
@ -1303,7 +1162,7 @@ namespace DS.WMS.Core.TaskPlat.Method
throw new Exception($"订舱的委托客户不能为空");
}
var djyCustomerInfo = clientInfoService.GetClientInfoWithContact(new Info.Dtos.QueryClientInfo { ClientId = bookingOrderEntity.CustomerId})
var djyCustomerInfo = clientInfoService.GetClientInfoWithContact(new Info.Dtos.QueryClientInfo { ClientId = bookingOrderEntity.CustomerId })
.GetAwaiter().GetResult().Data;
if (djyCustomerInfo == null)
@ -1350,7 +1209,7 @@ namespace DS.WMS.Core.TaskPlat.Method
if (usePersonalEmailSend)
{
publicMailAccount = _userEmailService.GetEmailSettings().GetAwaiter().GetResult().Data;
//&& x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
//&& x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
}
else
{
@ -1490,7 +1349,7 @@ namespace DS.WMS.Core.TaskPlat.Method
//new EmailNoticeHelper().SendEmailNotice($"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败", $"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList());
}
if(!result)
if (!result)
return DataResult.Failed(msg);
return DataResult.Successed(msg);
@ -2094,7 +1953,7 @@ namespace DS.WMS.Core.TaskPlat.Method
{
//更新订舱相关内容
if(paramConfig.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
if (paramConfig.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
await GenerateSendEmail(taskBcInfo, taskBaseInfo, orderInfo);
}
@ -2105,7 +1964,7 @@ namespace DS.WMS.Core.TaskPlat.Method
}
}
catch (Exception ex)
{
{
}
return DataResult.Successed("");

@ -430,14 +430,11 @@ public class CommonController : ApiController
/// <summary>
/// 批量获取任务台用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="isGetDefault">是否获取默认配置 false仅获取默认配置 true如果存在个人配置优先获取个人配置否则获取默认配置</param>
/// <param name="taskTypeCodeArray">任务类型Code</param>
[HttpGet]
[HttpPost]
[Route("GetUserTaskPlatFieldSet")]
public async Task<DataResult<List<SysFieldSetTaskPlatQueryDtos>>> GetUserTaskPlatFieldSet([FromQuery] string permissionId, [FromQuery] bool isGetDefault, [FromQuery] string[] taskTypeCodeArray)
public async Task<DataResult<List<SysFieldSetTaskPlatResultDto>>> GetUserTaskPlatFieldSet([FromBody] SysFieldSetTaskPlatQueryDto query)
{
var res = await _invokeService.GetUserTaskPlatFieldSet(permissionId, isGetDefault, taskTypeCodeArray);
var res = await _invokeService.GetUserTaskPlatFieldSet(query);
return res;
}

@ -59,6 +59,20 @@ public class SeaExportController : ApiController
var res = await _invokeService.GetSeaExportPartList(request);
return res;
}
/// <summary>
/// 海运出口日志列表
/// </summary>
/// <param name="id">主单id</param>
/// <returns></returns>
[HttpGet]
[Route("GetSeaExportLogList")]
public async Task<DataResult<List<OpBusinessLogRes>>> GetSeaExportLogList([FromQuery] string id)
{
var res = await _invokeService.GetSeaExportLogList(id);
return res;
}
/// <summary>
/// 编辑
/// </summary>
@ -92,9 +106,9 @@ public class SeaExportController : ApiController
/// <returns></returns>
[HttpPost]
[Route("SeaExportBatchEdit")]
public DataResult SeaExportBatchEdit([FromBody] SeaExportBatchEditReq req)
public async Task<DataResult> SeaExportBatchEdit([FromBody] SeaExportBatchEditReq req)
{
var res = _invokeService.SeaExportBatchEdit(req);
var res = await _invokeService.SeaExportBatchEdit(req);
return res;
}

@ -19,6 +19,10 @@
/// </summary>
public string TemplateCode { get; set; }
/// <summary>
/// 主键id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 主键ids
/// </summary>
public long[] Ids { get; set; }

@ -60,7 +60,7 @@ public class SaasDBUpdateTest
var tenantDb = saasService.GetBizDbScopeById(item.TenantId).CopyNew();
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci"; //较高版本支持
//tenantDb.CodeFirst.InitTables(types); //指定表空间下的实体
tenantDb.CodeFirst.InitTables(typeof(OpLetterYard));//指定更新特定实体
tenantDb.CodeFirst.InitTables(typeof(OpBusinessLog));//指定更新特定实体
}
Assert.True(true);

Loading…
Cancel
Save