jianghaiqing 4 months ago
commit ef6176e897

@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AnyDiff" Version="1.0.99" />
<PackageReference Include="Autofac" Version="8.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="AutoMapper" Version="12.0.1" />

@ -18,6 +18,10 @@ public class CM_BaseInfoReq
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>

@ -16,7 +16,10 @@ public class CM_BaseInfoRes
/// Desc:集装箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>

@ -1,5 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using FluentValidation;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Dtos;
@ -17,7 +19,10 @@ public class CM_CurrentStateReq
/// 集装箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
// <summary>
/// Desc:箱型
/// </summary>
@ -33,21 +38,24 @@ public class CM_CurrentStateReq
/// </summary>
public string CtnOwner { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string Corpid { get; set; }
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string CtnSource { get; set; }
public string CtnSource => CtnSourceId?.GetDescription();
/// <summary>
/// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱
/// </summary>
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
public string CtnBizState { get; set; } = "0";
public string CtnBizState { get; set; }
/// <summary>
/// Desc:箱业务编号:当前
@ -59,10 +67,15 @@ public class CM_CurrentStateReq
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
public string CtnState { get; set; }
public string CtnState => CtnStateId?.GetDescription();
/// <summary>
/// Desc:箱损坏/维修状态
@ -70,18 +83,26 @@ public class CM_CurrentStateReq
public string CtnBreakState { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
public Int16 IsOnline { get; set; } = 0;
public string IsOnline => IsOnlineId?.GetDescription();
/// <summary>
/// Desc:空重箱
/// </summary>
public bool? IsHeavy { get; set; } = false;
/// <summary>
/// Desc:当前港口
/// Desc:当前港口代码
/// </summary>
public string Portid { get; set; }
/// <summary>
/// Desc:当前港口
/// </summary>
public string Port { get; set; }
/// <summary>
/// Desc:码头或场站
@ -100,7 +121,11 @@ public class CM_CurrentStateReq
/// <summary>
/// Desc:业务委托单位
/// 业务委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位
/// </summary>
public string CustomerName { get; set; }

@ -1,4 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Dtos;
@ -16,7 +18,10 @@ public class CM_CurrentStateRes
/// 集装箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
// <summary>
/// Desc:箱型
/// </summary>
@ -33,19 +38,22 @@ public class CM_CurrentStateRes
public string CtnOwner { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string Corpid { get; set; }
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string CtnSource { get; set; }
public string CtnSource => CtnSourceId?.GetDescription();
/// <summary>
/// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱
/// </summary>
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
public string CtnBizState { get; set; } = "0";
public string CtnBizState { get; set; }
/// <summary>
/// Desc:箱业务编号:当前
@ -57,10 +65,14 @@ public class CM_CurrentStateRes
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
public string CtnState { get; set; }
public string CtnState => CtnStateId?.GetDescription();
/// <summary>
/// Desc:箱损坏/维修状态
@ -68,18 +80,28 @@ public class CM_CurrentStateRes
public string CtnBreakState { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
public Int16 IsOnline { get; set; } = 0;
public string IsOnline => IsOnlineId?.GetDescription();
/// <summary>
/// Desc:空重箱
/// </summary>
public bool? IsHeavy { get; set; } = false;
/// <summary>
/// Desc:当前港口
/// Desc:当前港口代码
/// </summary>
public string Portid { get; set; }
/// <summary>
/// Desc:当前港口
/// </summary>
public string Port { get; set; }
/// <summary>
/// Desc:码头或场站
@ -98,7 +120,11 @@ public class CM_CurrentStateRes
/// <summary>
/// Desc:业务委托单位
/// 业务委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位
/// </summary>
public string CustomerName { get; set; }

@ -22,7 +22,7 @@ public class CM_RentInReq
public BusinessType BusinessType { get; set; } = BusinessType.CM_RentIn;
/// <summary>
/// Desc:租箱退租
/// Desc:租箱业务
/// </summary>
public string RentDirect { get; set; }
@ -37,44 +37,36 @@ public class CM_RentInReq
public string BillState { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:原箱主Id
/// </summary>
[SugarColumn(ColumnDescription = "业务所属分部", IsNullable = true, Length = 50)]
public string Corpid { get; set; }
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
[SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)]
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:业务日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:会计期间
/// </summary>
[SugarColumn(ColumnDescription = "会计期间", IsNullable = true, Length = 7)]
public string Accdate { get; set; }
/// <summary>
/// Desc:是否业务锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否业务锁定", DefaultValue = "0")]
public bool? IsBusinessLocking { get; set; } = false;
/// <summary>
/// Desc:是否费用锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否费用锁定", DefaultValue = "0")]
public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// Desc:备注
/// </summary>
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)]
public string Remark { get; set; }
}

@ -14,28 +14,58 @@ public class CM_RentInRes
/// </summary>
public long Id { get; set; }
/// <summary>
/// Desc:集装箱
/// Desc:租箱业务
/// </summary>
public string Cntrno { get; set; }
public string Custno { get; set; }
public BusinessType BusinessType { get; set; } = BusinessType.CM_RentIn;
/// <summary>
/// Desc:箱型
/// Desc:租箱业务
/// </summary>
public string RentDirect { get; set; }
/// <summary>
/// Desc:租箱类型 长租短租单程
/// </summary>
public string RentType { get; set; }
/// <summary>
/// Desc:业务状态
/// </summary>
public string BillState { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
public string Ctnall { get; set; }
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:箱皮重
/// Desc:业务日期
/// </summary>
public decimal? CtnWeight { get; set; }
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:箱生产时间
/// Desc:会计期间
/// </summary>
public string Accdate { get; set; }
/// <summary>
/// Desc:是否业务锁定
/// </summary>
public bool? IsBusinessLocking { get; set; } = false;
/// <summary>
/// Desc:是否费用锁定
/// </summary>
public DateTime? ProductionDate { get; set; }
public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// Desc:箱初期成本
/// Desc:备注
/// </summary>
public decimal? CtnValue_Base { get; set; }
public string Remark { get; set; }
}

@ -28,13 +28,19 @@ public class CM_RentIn_DetailReq
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
@ -72,7 +78,7 @@ public class CM_RentIn_DetailReq
/// <summary>
/// Desc:开始计费日期
/// </summary>
public string FeeStartDate { get; set; }
public DateTime? FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
@ -107,16 +113,24 @@ public class CM_RentIn_DetailReq
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPortid { get; set; }
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -27,13 +27,19 @@ public class CM_RentIn_DetailRes
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
@ -71,7 +77,7 @@ public class CM_RentIn_DetailRes
/// <summary>
/// Desc:开始计费日期
/// </summary>
public string FeeStartDate { get; set; }
public DateTime? FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
@ -107,16 +113,24 @@ public class CM_RentIn_DetailRes
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPortid { get; set; }
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -22,7 +22,7 @@ public class CM_RentOutReq
public BusinessType BusinessType { get; set; } = BusinessType.CM_RentOut;
/// <summary>
/// Desc:租箱退租
/// Desc:租箱业务
/// </summary>
public string RentDirect { get; set; }
@ -37,14 +37,13 @@ public class CM_RentOutReq
public string BillState { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:租箱客户Id
/// </summary>
public string Corpid { get; set; }
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
public string RentCustomername { get; set; }
public string RentCustomerName { get; set; }
/// <summary>

@ -21,7 +21,7 @@ public class CM_RentOutRes
public BusinessType BusinessType { get; set; } = BusinessType.CM_RentOut;
/// <summary>
/// Desc:租箱退租
/// Desc:租箱业务
/// </summary>
public string RentDirect { get; set; }
@ -36,14 +36,13 @@ public class CM_RentOutRes
public string BillState { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:租箱客户Id
/// </summary>
public string Corpid { get; set; }
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
public string RentCustomername { get; set; }
public string RentCustomerName { get; set; }
/// <summary>

@ -28,7 +28,10 @@ public class CM_RentOut_DetailReq
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
@ -107,16 +110,24 @@ public class CM_RentOut_DetailReq
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPortid { get; set; }
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -27,7 +27,10 @@ public class CM_RentOut_DetailRes
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
@ -106,16 +109,24 @@ public class CM_RentOut_DetailRes
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPortid { get; set; }
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -1,6 +1,8 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using FluentValidation;
using Mapster;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Dtos;
@ -18,23 +20,33 @@ public class CM_State_ChangeReq
/// 集装箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
public Int16 IsOnline { get; set; } = 0;
public string IsOnline => IsOnlineId?.GetDescription();
/// <summary>
/// Desc:变动来源 用于表示此变动来自哪个业务模块
/// </summary>
public CMChangeSourceEnum? ChangeSourceId { get; set; }
/// <summary>
/// Desc:变动来源 用于表示此变动来自哪个业务模块
/// </summary>
public string ChangeSource { get; set; }
public string ChangeSource => ChangeSourceId?.GetDescription();
/// <summary>
/// Desc:新旧箱 空白/used/new
@ -48,19 +60,22 @@ public class CM_State_ChangeReq
/// <summary>
/// Desc:业务所属分部
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string Corpid { get; set; }
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string CtnSource { get; set; }
public string CtnSource => CtnSourceId?.GetDescription();
/// <summary>
/// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱
/// </summary>
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
public string CtnBizState { get; set; } = "0";
public string CtnBizState { get; set; }
/// <summary>
/// Desc:箱业务编号:当前
@ -72,10 +87,14 @@ public class CM_State_ChangeReq
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
public string CtnState { get; set; }
public string CtnState => CtnStateId?.GetDescription();
/// <summary>
/// Desc:箱损坏/维修状态
@ -88,10 +107,15 @@ public class CM_State_ChangeReq
public bool? IsHeavy { get; set; } = false;
/// <summary>
/// Desc:当前港口
/// Desc:当前港口代码
/// </summary>
public string Portid { get; set; }
/// <summary>
/// Desc:当前港口
/// </summary>
public string Port { get; set; }
/// <summary>
/// Desc:码头或场站
/// </summary>
@ -109,7 +133,11 @@ public class CM_State_ChangeReq
/// <summary>
/// Desc:业务委托单位
/// 业务委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位
/// </summary>
public string CustomerName { get; set; }

@ -1,4 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Dtos;
@ -16,16 +18,23 @@ public class CM_State_ChangeRes
/// 集装箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
public Int16 IsOnline { get; set; } = 0;
public string IsOnline => IsOnlineId?.GetDescription();
/// <summary>
/// Desc:新旧箱 空白/used/new
@ -38,19 +47,22 @@ public class CM_State_ChangeRes
public string CtnOwner { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string Corpid { get; set; }
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
public string CtnSource { get; set; }
public string CtnSource => CtnSourceId?.GetDescription();
/// <summary>
/// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱
/// </summary>
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
public string CtnBizState { get; set; } = "0";
public string CtnBizState { get; set; }
/// <summary>
/// Desc:箱业务编号:当前
@ -62,10 +74,14 @@ public class CM_State_ChangeRes
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
public string CtnState { get; set; }
public string CtnState => CtnStateId?.GetDescription();
/// <summary>
/// Desc:箱损坏/维修状态
@ -78,10 +94,15 @@ public class CM_State_ChangeRes
public bool? IsHeavy { get; set; } = false;
/// <summary>
/// Desc:当前港口
/// Desc:当前港口代码
/// </summary>
public string Portid { get; set; }
/// <summary>
/// Desc:当前港口
/// </summary>
public string Port { get; set; }
/// <summary>
/// Desc:码头或场站
/// </summary>
@ -97,9 +118,12 @@ public class CM_State_ChangeRes
/// </summary>
public string Mblno { get; set; }
/// <summary>
/// Desc:业务委托单位
/// 业务委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位
/// </summary>
public string CustomerName { get; set; }

@ -16,7 +16,11 @@ public class CM_BaseInfo : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Enums;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Entity;
@ -15,7 +16,11 @@ public class CM_CurrentState : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
@ -32,7 +37,7 @@ public class CM_CurrentState : BaseOrgModel<long>
/// <summary>
/// 箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = false, DefaultValue = "0")]
[SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = true, DefaultValue = "0")]
public long CtnOwnerId { get; set; }
/// <summary>
/// Desc:箱主 t_info_client CUSTNAME
@ -40,17 +45,31 @@ public class CM_CurrentState : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "箱主", IsNullable = true, Length = 50)]
public string CtnOwner { get; set; }
/// <summary>
/// Desc:箱来源Id: 自有箱/短租租入/长租租入/买箱
/// </summary>
[SugarColumn(ColumnDescription = "箱来源Id", IsNullable = true, Length = 20)]
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
/// </summary>
[SugarColumn(ColumnDescription = "箱来源", IsNullable = true, Length = 20)]
public string CtnSource { get; set; }
/// <summary>
/// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱
/// </summary>
[SugarColumn(ColumnDescription = "箱业务状态Id", IsNullable = true)]
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
[SugarColumn(ColumnDescription = "箱业务状态", IsNullable = true, DefaultValue = "")]
public string CtnBizState { get; set; } = "0";
public string CtnBizState { get; set; }
/// <summary>
/// Desc:箱业务编号:当前
@ -63,7 +82,11 @@ public class CM_CurrentState : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)]
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
[SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true, Length = 20)]
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
@ -76,11 +99,18 @@ public class CM_CurrentState : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "箱损坏/维修状态", IsNullable = true, Length = 20)]
public string CtnBreakState { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
[SugarColumn(ColumnDescription = "是否上线id", IsNullable = true, DefaultValue = "0")]
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
[SugarColumn(ColumnDescription = "是否上线", IsNullable = true, DefaultValue = "0")]
public Int16? IsOnline { get; set; } = 0;
[SugarColumn(ColumnDescription = "是否上线", IsNullable = true, Length = 20)]
public string IsOnline { get; set; }
/// <summary>
/// Desc:空重箱
@ -116,7 +146,7 @@ public class CM_CurrentState : BaseOrgModel<long>
/// <summary>
/// 委托单位Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = false, DefaultValue = "0")]
[SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = true, DefaultValue = "0")]
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位 t_info_client CUSTNAME

@ -0,0 +1,50 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Entity;
/// <summary>
/// 箱管_月结账单
/// </summary>
[SqlSugar.SugarTable("CM_ustFeeDui", "箱管_月结账单")]
public class CM_ustFeeDui : BaseOrgModel<long>
{
/// <summary>
/// Desc:月结账单编号
/// </summary>
[SugarColumn(ColumnDescription = "月结账单编号", IsNullable = false, Length = 20)]
public string Billno { get; set; }
/// <summary>
/// 结算对象Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "结算对象Id", IsNullable = false, DefaultValue = "0")]
public long CustomerId { get; set; }
/// <summary>
/// 结算对象 t_info_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "结算对象", IsNullable = true, Length = 50)]
public string CustomerName { get; set; }
/// <summary>
/// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum
/// </summary>
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")]
public string RentType { get; set; }
/// <summary>
/// Desc:业务状态
/// </summary>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:备注
/// </summary>
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)]
public string Remark { get; set; }
}

@ -17,9 +17,9 @@ public class CM_RentIn : BaseOrgModel<long>
public string Billno { get; set; }
/// <summary>
/// Desc:租箱退租
/// Desc:租箱业务
/// </summary>
[SugarColumn(ColumnDescription = "租箱退租", IsNullable = false, Length = 20)]
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = false, Length = 20)]
public string RentDirect { get; set; }
/// <summary>
@ -34,7 +34,11 @@ public class CM_RentIn : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = true, DefaultValue = "0")]
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
@ -45,7 +49,7 @@ public class CM_RentIn : BaseOrgModel<long>
/// <summary>
/// Desc:业务日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>

@ -13,7 +13,7 @@ public class CM_RentIn_Detail : BaseOrgModel<long>
/// <summary>
/// 租箱业务id
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = false)]
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
public long Pid { get; set; }
/// <summary>
@ -27,14 +27,22 @@ public class CM_RentIn_Detail : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
[SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)]
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = true, DefaultValue = "0")]
public long? OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
@ -72,14 +80,14 @@ public class CM_RentIn_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:租入日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:开始计费日期
/// </summary>
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true, Length = 7)]
public string FeeStartDate { get; set; }
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)]
public DateTime? FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
@ -105,7 +113,7 @@ public class CM_RentIn_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:提箱日期
/// </summary>
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)]
public DateTime? PickupDate { get; set; }
/// <summary>
@ -118,23 +126,31 @@ public class CM_RentIn_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:还箱日期
/// </summary>
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)]
public DateTime? DropoffDate { get; set; }
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口
/// Desc:还箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -0,0 +1,130 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Entity;
/// <summary>
/// 箱管_单程业务
/// </summary>
[SqlSugar.SugarTable("CM_RentOneWay", "箱管_单程业务")]
public class CM_RentOneWay : BaseOrgModel<long>
{
/// <summary>
/// Desc:租箱业务号
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)]
public string Billno { get; set; }
/// <summary>
/// Desc:租箱业务 租入 租入退租 租出 CMRentDirectEnum
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = false, Length = 20)]
public string RentDirect { get; set; }
/// <summary>
/// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum
/// </summary>
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")]
public string RentType { get; set; }
/// <summary>
/// Desc:业务状态
/// </summary>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")]
public long OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
[SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)]
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:业务日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:会计期间
/// </summary>
[SugarColumn(ColumnDescription = "会计期间", IsNullable = true, Length = 7)]
public string Accdate { get; set; }
/// <summary>
/// Desc:是否业务锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否业务锁定", IsNullable = false, DefaultValue = "0")]
public bool? IsBusinessLocking { get; set; } = false;
/// <summary>
/// Desc:是否费用锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否费用锁定", IsNullable = false, DefaultValue = "0")]
public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// Desc:提箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
public string DropoffPort { get; set; }
/// <summary>
/// Desc:ETD
/// </summary>
[SugarColumn(ColumnDescription = "ETD", IsNullable = true)]
public DateTime? ETD { get; set; }
/// <summary>
/// Desc:ETD
/// </summary>
[SugarColumn(ColumnDescription = "ETA", IsNullable = true)]
public DateTime? ETA { get; set; }
/// <summary>
/// Desc:当前业务编号
/// </summary>
[SugarColumn(ColumnDescription = "当前业务编号", IsNullable = true, Length = 50)]
public string Mblno { get; set; }
/// <summary>
/// Desc:备注
/// </summary>
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)]
public string Remark { get; set; }
}

@ -0,0 +1,175 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Entity;
/// <summary>
/// 箱管_租箱租入明细
/// </summary>
[SqlSugar.SugarTable("CM_RentOneWay_Detail", "箱管_租箱租入明细")]
public class CM_RentOneWay_Detail : BaseOrgModel<long>
{
/// <summary>
/// 租箱业务id
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
public long Pid { get; set; }
/// <summary>
/// Desc:租箱业务号
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)]
public string Billno { get; set; }
/// <summary>
/// Desc:箱号
/// </summary>
[SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
[SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)]
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")]
public long OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
[SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)]
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:租箱业务 租入0/租入退租1
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = true, Length = 20)]
public string CMRentDirectEnum { get; set; }
/// <summary>
/// Desc:租箱类型 长租1 短租0 单程2
/// </summary>
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20)]
public string RentType { get; set; }
/// <summary>
/// Desc:业务状态
/// </summary>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:关联放箱单号
/// </summary>
[SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)]
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:租入日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:开始计费日期
/// </summary>
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)]
public DateTime? FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
/// </summary>
[SugarColumn(ColumnDescription = "币别", IsNullable = true, Length = 7)]
public string Currenty { get; set; } = "USD";
/// <summary>
/// Desc:日租金
/// </summary>
[SugarColumn(ColumnDescription = "日租金", IsNullable = true, Length = 20)]
public decimal? Dailyrate { get; set; } = 0M;
/// <summary>
/// Desc:提箱费
/// </summary>
[SugarColumn(ColumnDescription = "提箱费", IsNullable = true, Length = 20)]
public decimal? PickupFee { get; set; } = 0M;
/// <summary>
/// Desc:提箱日期
/// </summary>
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)]
public DateTime? PickupDate { get; set; }
/// <summary>
/// Desc:还箱费
/// </summary>
[SugarColumn(ColumnDescription = "还箱费", IsNullable = true, Length = 20)]
public decimal? DropoffFee { get; set; } = 0M;
/// <summary>
/// Desc:还箱日期
/// </summary>
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)]
public DateTime? DropoffDate { get; set; }
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号
/// </summary>
[SugarColumn(ColumnDescription = "业务编号/提单号", IsNullable = true, Length = 20)]
public string Mblno { get; set; }
/// <summary>
/// Desc:运输工具
/// </summary>
[SugarColumn(ColumnDescription = "运输工具", IsNullable = true, Length = 100)]
public string VehicleName { get; set; }
}

@ -33,17 +33,21 @@ public class CM_RentOut : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
public string RentCustomername { get; set; }
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:业务日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>

@ -13,7 +13,7 @@ public class CM_RentOut_Detail : BaseOrgModel<long>
/// <summary>
/// 租箱业务id
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = false)]
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
public long Pid { get; set; }
/// <summary>
@ -27,19 +27,27 @@ public class CM_RentOut_Detail : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
[SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)]
public string Ctnall { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
public string RentCustomername { get; set; }
public string RentCustomerName { get; set; }
@ -71,16 +79,16 @@ public class CM_RentOut_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:租日期
/// Desc:租日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "租出业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:开始计费日期
/// </summary>
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true, Length = 7)]
public string FeeStartDate { get; set; }
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)]
public DateTime? FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
@ -104,7 +112,7 @@ public class CM_RentOut_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:提箱日期
/// </summary>
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)]
public DateTime? PickupDate { get; set; }
/// <summary>
/// Desc:还箱费
@ -116,23 +124,32 @@ public class CM_RentOut_Detail : BaseOrgModel<long>
/// <summary>
/// Desc:还箱日期
/// </summary>
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)]
public DateTime? DropoffDate { get; set; }
/// <summary>
/// Desc:提箱港口
/// Desc:提箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
public string PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口
/// Desc:还箱港口代码
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号

@ -33,17 +33,21 @@ public class CM_Rent_OneWay : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
public string BillState { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
public string RentCustomername { get; set; }
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:业务日期
/// </summary>
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)]
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
public DateTime? Bsdate { get; set; }
/// <summary>

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Enums;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Entity;
@ -15,24 +16,39 @@ public class CM_State_Change : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)]
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
[SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)]
public string Ctnall { get; set; }
/// <summary>
/// Desc:变动来源Id 用于表示此变动来自哪个业务模块
/// </summary>
[SugarColumn(ColumnDescription = "变动来源Id", IsNullable = true)]
public CMChangeSourceEnum ChangeSourceId { get; set; }
/// <summary>
/// Desc:变动来源 用于表示此变动来自哪个业务模块
/// </summary>
[SugarColumn(ColumnDescription = "变动来源", IsNullable = false, Length = 50)]
[SugarColumn(ColumnDescription = "变动来源", IsNullable = true, Length = 50)]
public string ChangeSource { get; set; }
/// <summary>
/// Desc:是否上线id(是否管理中)
/// </summary>
[SugarColumn(ColumnDescription = "是否上线id", IsNullable = true, DefaultValue = "0")]
public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0;
/// <summary>
/// Desc:是否上线(是否管理中)
/// </summary>
[SugarColumn(ColumnDescription = "是否上线", IsNullable = false,DefaultValue ="0")]
public Int16? IsOnline { get; set; } = 0;
[SugarColumn(ColumnDescription = "是否上线", IsNullable = true, Length = 20)]
public string IsOnline { get; set; }
/// <summary>
/// Desc:新旧箱 空白/used/new
@ -43,7 +59,7 @@ public class CM_State_Change : BaseOrgModel<long>
/// <summary>
/// 箱主Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = false, DefaultValue = "0")]
[SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = true, DefaultValue = "0")]
public long CtnOwnerId { get; set; }
/// <summary>
/// Desc:箱主
@ -52,10 +68,10 @@ public class CM_State_Change : BaseOrgModel<long>
public string CtnOwner { get; set; }
/// <summary>
/// Desc:业务所属分部
/// Desc:箱来源Id: 自有箱/短租租入/长租租入/买箱
/// </summary>
[SugarColumn(ColumnDescription = "业务所属分部", IsNullable = true, Length = 50)]
public string Corpid { get; set; }
[SugarColumn(ColumnDescription = "箱来源Id", IsNullable = true, Length = 20)]
public CM_CtnSourceEnum? CtnSourceId { get; set; }
/// <summary>
/// Desc:箱来源: 自有箱/短租租入/长租租入/买箱
@ -66,7 +82,7 @@ public class CM_State_Change : BaseOrgModel<long>
/// <summary>
/// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱
/// </summary>
[SugarColumn(ColumnDescription = "箱业务状态", DefaultValue = "")]
[SugarColumn(ColumnDescription = "箱业务状态", IsNullable = true, DefaultValue = "")]
public string CtnBizState { get; set; } = "0";
/// <summary>
@ -78,9 +94,14 @@ public class CM_State_Change : BaseOrgModel<long>
/// <summary>
/// Desc:关联放箱单号
/// </summary>
[SugarColumn(ColumnDescription = "关联放箱单号", Length = 50)]
[SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)]
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:箱状态Id
/// </summary>
[SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true, Length = 20)]
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱状态
/// </summary>
@ -96,7 +117,7 @@ public class CM_State_Change : BaseOrgModel<long>
/// <summary>
/// Desc:空重箱
/// </summary>
[SugarColumn(ColumnDescription = "空重箱", IsNullable = false, DefaultValue = "0")]
[SugarColumn(ColumnDescription = "空重箱", IsNullable = true, DefaultValue = "0")]
public bool? IsHeavy { get; set; } = false;
/// <summary>
@ -127,7 +148,7 @@ public class CM_State_Change : BaseOrgModel<long>
/// <summary>
/// 委托单位Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = false, DefaultValue = "0")]
[SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = true, DefaultValue = "0")]
public long CustomerId { get; set; }
/// <summary>
/// 业务委托单位 t_info_client CUSTNAME

@ -22,6 +22,7 @@ using DS.WMS.Core.Fee.Entity;
using Org.BouncyCastle.Crypto;
using DS.WMS.Core.TaskPlat.Dtos;
using LanguageExt;
using DS.Module.Core.Enums;
namespace DS.WMS.ContainerManagement.Info.Method;
@ -121,7 +122,7 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
{
var _addrec = item.Adapt<CM_State_Change>();
_addrec.Id = 0;
_addrec.ChangeSource = "手动批量更新";
_addrec.ChangeSourceId = CMChangeSourceEnum.;
//_addrec.ChangeTime = DateTime.Now;
TenantDb.Insertable(_addrec).ExecuteReturnEntity();
@ -201,16 +202,19 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
newCurrState.Id = 0;
newCurrState.Cntrno = change.Cntrno;
newCurrState.CtnCode = change.CtnCode;
newCurrState.Ctnall = change.Ctnall;
if (change.CtnState != null)
if (change.CtnStateId != null)
{
newCurrState.CtnStateId = change.CtnStateId;
newCurrState.CtnState = change.CtnState;
}
if (change.IsOnline != null)
if (change.IsOnlineId != null)
{
newCurrState.IsOnline = change.IsOnline;
newCurrState.IsOnlineId = change.IsOnlineId;
//newCurrState.IsOnline= CM_IsOnlineEnum.get
}
if (change.UsedState != null)
@ -222,16 +226,16 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
{
newCurrState.CtnOwner = change.CtnOwner;
}
//if (change.Corpid != null)
//{
// newCurrState.Corpid = change.Corpid;
//}
if (change.CtnSource != null)
{
newCurrState.CtnSourceId = change.CtnSourceId;
newCurrState.CtnSource = change.CtnSource;
}
if (change.CtnBizState != null)
if (change.CtnBizStateId != null)
{
newCurrState.CtnBizStateId = change.CtnBizStateId;
newCurrState.CtnBizState = change.CtnBizState;
}
if (change.Billno != null)
@ -262,8 +266,9 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
{
newCurrState.Mblno = change.Mblno;
}
if (change.CustomerName != null)
if (change.CustomerId != null)
{
newCurrState.CustomerId = change.CustomerId;
newCurrState.CustomerName = change.CustomerName;
}
//
@ -289,11 +294,13 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
else {
//查看已有的变动信息,如果新增的这条不是
CurrState.CtnCode = change.CtnCode;
CurrState.Ctnall = change.Ctnall;
if (change.CtnState != null)
if (change.CtnStateId != null)
{
CurrState.CtnStateId = change.CtnStateId;
CurrState.CtnState = change.CtnState;
}
@ -311,16 +318,14 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
{
CurrState.CtnOwner = change.CtnOwner;
}
//if (change.Corpid != null)
//{
// CurrState.Corpid = change.Corpid;
//}
if (change.CtnSource != null)
{
CurrState.CtnSourceId = change.CtnSourceId;
CurrState.CtnSource = change.CtnSource;
}
if (change.CtnBizState != null)
if (change.CtnBizStateId != null)
{
CurrState.CtnBizStateId = change.CtnBizStateId;
CurrState.CtnBizState = change.CtnBizState;
}
if (change.Billno != null)
@ -351,8 +356,9 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
{
CurrState.Mblno = change.Mblno;
}
if (change.CustomerName != null)
if (change.CustomerId != null)
{
CurrState.CustomerId = change.CustomerId;
CurrState.CustomerName = change.CustomerName;
}
//
@ -374,6 +380,7 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
var newBaseinfo = new CM_BaseInfo();
newBaseinfo.Cntrno = change.Cntrno;
newBaseinfo.CtnCode = change.CtnCode;
newBaseinfo.Ctnall = change.Ctnall;
newBaseinfo.ProductionDate = null;
newBaseinfo.CtnValue_Base = change.CtnValue_Base==null?0:change.CtnValue_Base;
@ -417,8 +424,6 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
CurrState.CtnOwner = "";
//CurrState.Corpid = "";
CurrState.CtnSource = "";
CurrState.CtnBizState = "";
@ -451,19 +456,19 @@ public class CM_State_ChangeService : CMServiceBase, ICM_State_ChangeService
//对每一个字段而言 寻找其日志表中最后一条非空值
//如果没有找到 则不做处理
foreach (var item in OldStateChangeList)
{
if (!string.IsNullOrWhiteSpace(item.Ctnall)) {
CurrState.Ctnall = item.Ctnall;
}
}
foreach (var item in OldStateChangeList)
{
if (!string.IsNullOrWhiteSpace(item.Ctnall))
{
CurrState.Ctnall = item.Ctnall;
}
}
//foreach (var item in OldStateChangeList)
//{
// if (!string.IsNullOrWhiteSpace(item.Ctnall)) {
// CurrState.Ctnall = item.Ctnall;
// }
//}
//foreach (var item in OldStateChangeList)
//{
// if (!string.IsNullOrWhiteSpace(item.Ctnall))
// {
// CurrState.Ctnall = item.Ctnall;
// }
//}
}
return DataResult.Success;

@ -111,6 +111,9 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
{
ArgumentNullException.ThrowIfNull(info, nameof(info));
if (info.Instance == null)
return DataResult.Failed("未能获取工作流", MultiLanguageConst.Operation_Failed);
if (info.Instance.FlowStatus == FlowStatusEnum.Approve)
return DataResult.Failed("该工作流已完成!", MultiLanguageConst.FlowInstanceFinished);

@ -430,15 +430,13 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
};
instance.Content = JsonConvert.SerializeObject(runtime.ToFlowRoot(), Formatting.None, serializerSettings);
instance.Note = auditNote;
Db.Updateable(instance).ExecuteCommand();
//流程==4为结束执行回调URL
int nextNodeType = runtime.GetNextNodeType();
if (runtime.NextNodeType != 5 && (nextNodeType == 4 || nextNodeType == -1) && !instance.CallbackURL.IsNullOrEmpty())
{
instance.Note = auditNote;
Task.Factory.StartNew(() => RunCallbackAsync(instance));
}
var userId = long.Parse(User.UserId);
var userInfo = Db.Queryable<SysUser>().Where(x => x.Id == userId).Select(x => new { x.Id, x.UserName }).First();

@ -497,7 +497,7 @@ public class InfoClient : BaseModelV2<long>
/// <summary>
/// 开票方式
/// </summary>
[SugarColumn(ColumnDescription = "开票方式")]
[SugarColumn(ColumnDescription = "开票方式", IsNullable = true)]
public InvoicingMethod? InvoicingMethod { get; set; }
/// <summary>

@ -0,0 +1,47 @@
using DS.WMS.Core.Op.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
///
/// </summary>
public class SeaExportSaveLog
{
/// <summary>
/// 操作方式:新增(Create)、更新(Update)、删除(Delete)
/// </summary>
public string OperateType { get; set; } = "Update";
/// <summary>
/// 旧值
/// </summary>
public SeaExport OldOrder { get; set; }
/// <summary>
/// 新值
/// </summary>
public SeaExport NewOrder { get; set; }
/// <summary>
/// 业务来源代码
/// </summary>
public string SourceCode { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public string SourceName { get; set; }
/// <summary>
///
/// </summary>
public List<string> UpdateFields { get; set; }
}
}

@ -55,5 +55,10 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 驳回审批理由
/// </summary>
public string? RejectReason { get; set; }
}
}

@ -19,5 +19,10 @@
/// 任务接收用户ID此值为空时则从配置中获取
/// </summary>
public long[]? RecvUserIdList { get; set; }
/// <summary>
/// 驳回审批理由
/// </summary>
public string? RejectReason { get; set; }
}
}

@ -16,5 +16,10 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction
/// 当任务完成时是否根据任务类型自动创建下一任务默认为true
/// </summary>
public bool AutoCreateNext { get; set; } = true;
/// <summary>
/// 驳回审批理由
/// </summary>
public string? RejectReason { get; set; }
}
}

@ -76,5 +76,11 @@ namespace DS.WMS.Core.Op.Entity.TaskInteraction
/// </summary>
[SugarColumn(ColumnDescription = "创建时间", IsNullable = false)]
public DateTime CreateTime { get; set; }
/// <summary>
/// 审批驳回理由
/// </summary>
[SugarColumn(ColumnDescription = "审批驳回理由", Length = 200, IsNullable = true)]
public string? RejectReason { get; set; }
}
}

@ -0,0 +1,104 @@
using System.ComponentModel;
using System.Runtime.Serialization;
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Op.Entity.TaskInteraction
{
/// <summary>
/// 业务任务日志表
/// </summary>
[SugarTable("business_task_log", "业务任务日志表")]
public class BusinessTaskLog
{
/// <summary>
/// ID
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true), IgnoreDataMember]
public long Id { get; set; }
/// <summary>
/// 动作类型
/// </summary>
[SugarColumn(ColumnDescription = "动作类型", IsNullable = false)]
public ActionType? ActionType { get; set; }
/// <summary>
/// 业务ID
/// </summary>
[SugarColumn(ColumnDescription = "业务ID", IsNullable = false)]
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[SugarColumn(ColumnDescription = "业务类型", IsNullable = false)]
public BusinessType BusinessType { get; set; }
/// <summary>
/// 任务类型
/// </summary>
[SugarColumn(ColumnDescription = "任务类型", IsNullable = false)]
public TaskBaseTypeEnum TaskType { get; set; }
/// <summary>
/// 任务状态
/// </summary>
[SugarColumn(ColumnDescription = "任务状态", IsNullable = true)]
public TaskStatusEnum? TaskStatus { get; set; }
/// <summary>
/// 审核状态
/// </summary>
[SugarColumn(ColumnDescription = "审核状态", IsNullable = true)]
public FlowStatusEnum? AuditStatus { get; set; }
/// <summary>
/// 接收人
/// </summary>
[SugarColumn(ColumnDescription = "接收人", IsNullable = true)]
public string? RecvUsers { get; set; }
/// <summary>
/// 获取接收人列表
/// </summary>
[SugarColumn(IsIgnore = true)]
public string[] RecvUserIdArray => RecvUsers == null ? [] : RecvUsers.Split(',', StringSplitOptions.RemoveEmptyEntries);
/// <summary>
/// 备注
/// </summary>
[SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = "text")]
public string? Remark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnDescription = "创建人", IsNullable = false)]
public long CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnDescription = "创建时间", IsNullable = false)]
public DateTime CreateTime { get; set; }
}
/// <summary>
/// 动作类型
/// </summary>
public enum ActionType
{
/// <summary>
/// 新增
/// </summary>
[Description("新增")]
Create = 1,
/// <summary>
/// 状态变更
/// </summary>
[Description("状态变更")]
StatusChanged = 2
}
}

@ -14,6 +14,12 @@ namespace DS.WMS.Core.Op.Interface
{
public interface ISeaExportCommonService
{
/// <summary>
/// 海运出口差异日志
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public Task SaveSeaExportLog(SeaExportSaveLog req);
/// <summary>
/// 获取第三方账户
/// </summary>

@ -0,0 +1,44 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
namespace DS.WMS.Core.Op.Interface.TaskInteraction
{
/// <summary>
/// 海运出口交互任务
/// </summary>
public interface ITaskLogService
{
/// <summary>
/// 读取业务日志
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
Task<DataResult<List<BusinessTaskLog>>> ReadLogAsync(long id, BusinessType businessType);
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="request"></param>
/// <param name="remark">备注</param>
/// <returns></returns>
Task WriteLogAsync(TaskUpdateRequest request, string? remark = null);
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="task"></param>
/// <param name="remark">备注</param>
/// <returns></returns>
Task WriteLogAsync(BusinessTask task, string? remark = null);
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="logs"></param>
/// <returns></returns>
Task WriteLogAsync(params BusinessTaskLog[] logs);
}
}

@ -16,8 +16,9 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="types">任务类型</param>
/// <returns></returns>
Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType);
Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types);
/// <summary>
/// 创建关联任务

@ -1,5 +1,4 @@
using Amazon.S3.Model;
using DS.Module.Core;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
@ -15,17 +14,18 @@ using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using LanguageExt.Pipes;
using Mapster;
using Masuit.Tools;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json.Linq;
using NLog;
using NPOI.HSSF.UserModel;
using NPOI.SS.Formula.Functions;
using SqlSugar;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using Logger = NLog.Logger;
using AnyDiff.Extensions;
namespace DS.WMS.Core.Op.Method
{
@ -53,6 +53,78 @@ namespace DS.WMS.Core.Op.Method
_environment = _serviceProvider.GetRequiredService<IWebHostEnvironment>();
}
/// <summary>
/// 忽略的字段
/// </summary>
private static readonly List<string> IgnoreColumns = new List<string>()
{
"CreateTime",
"CreateUserName",
"CreateBy",
"UpdateTime",
"UpdateUserName",
"UpdateBy",
"DeleteTime",
"DeleteUserName",
"DeleteBy",
"TenantId",
"TenantName",
};
public async Task SaveSeaExportLog(SeaExportSaveLog req) {
bool flag = true;
long bid = 0;
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),
// };
// }
//}
}
#region 获取客户结算方式及结算日期

@ -520,6 +520,7 @@ public partial class SeaExportService : ISeaExportService
{
return await Task.FromResult(DataResult.Failed("海运出口信息业务已锁定!", MultiLanguageConst.SeaExportBusinessLock));
}
var oldOrder = info;
info = req.Adapt(info);
//TODO 会计期间不允许小于已结转期间
if (info.CloseDocDate.IsNotNull() && info.CloseDocDate > info.ETD)
@ -554,6 +555,15 @@ public partial class SeaExportService : ISeaExportService
await dbScope.Ado.BeginTranAsync();
info.Note = "正常编辑";
await tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommandAsync();
await seaComService.SaveSeaExportLog(new SeaExportSaveLog()
{
OperateType = "Update",
OldOrder = oldOrder,
NewOrder = info,
SourceCode = "NormalEdit",
SourceName = "正常编辑",
});
//处理订单联系人信息
DealBusinessOrderContact(info, tenantDb);

@ -44,6 +44,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
string tenatName = Db.Queryable<SysTenant>().Where(x => x.Id == tenatId).Select(x => x.Name).First();
var dt = DateTime.Now;
var taskList = new List<BusinessTask>();
var taskLogList = new List<BusinessTaskLog>();
var first = request.First();
var defaultUsers = await GetRecvUsers(first.RecvUserIdList);
@ -104,9 +105,20 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
CreateTime = dt
};
taskList.Add(task);
taskLogList.Add(new BusinessTaskLog
{
BusinessId = task.BusinessId,
BusinessType = task.BusinessType,
CreateBy = userId,
CreateTime = dt,
RecvUsers = info.Main.RecvUserInfoList == null ? null : string.Join(",", info.Main.RecvUserInfoList.Select(x => x.RecvUserName)),
TaskStatus = task.TaskStatus,
TaskType = task.TaskType
});
}
await TenantDb.Insertable(taskList).ExecuteCommandAsync();
await TenantDb.Insertable(taskLogList).ExecuteCommandAsync();
}
/// <summary>

@ -0,0 +1,111 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Sys.Entity;
namespace DS.WMS.Core.Op.Method.TaskInteraction
{
/// <summary>
/// 任务日志服务
/// </summary>
public class TaskLogService : ServiceBase, ITaskLogService
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public TaskLogService(IServiceProvider provider) : base(provider)
{
}
/// <summary>
/// 读取业务日志
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
public async Task<DataResult<List<BusinessTaskLog>>> ReadLogAsync(long id, BusinessType businessType)
{
var list = await TenantDb.Queryable<BusinessTaskLog>().Where(x => x.BusinessId == id && x.BusinessType == businessType)
.OrderBy(x => x.CreateTime).ToListAsync();
var result = DataResult<List<BusinessTaskLog>>.Success(list);
result.Count = list.Count;
return result;
}
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="request"></param>
/// <param name="remark">备注</param>
/// <returns></returns>
public async Task WriteLogAsync(TaskUpdateRequest request, string? remark = null)
{
long userId = long.Parse(User.UserId);
string userName = await Db.Queryable<SysUser>().Where(x => x.Id == userId).Select(
x => x.UserName).FirstAsync();
BusinessTaskLog taskLog = new BusinessTaskLog
{
ActionType = ActionType.StatusChanged,
BusinessId = request.BusinessId,
BusinessType = request.BusinessType,
CreateBy = long.Parse(User.UserId),
CreateTime = DateTime.Now,
TaskStatus = request.TaskStatus,
TaskType = request.TaskType,
Remark = remark,
RecvUsers = userName
};
await WriteLogAsync(taskLog);
}
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="task"></param>
/// <param name="remark">备注</param>
/// <returns></returns>
public async Task WriteLogAsync(BusinessTask task, string? remark = null)
{
string userNames = string.Empty;
if (task.RecvUserIdArray?.Length > 0)
{
var list = await Db.Queryable<SysUser>().Where(x => task.RecvUserIdArray.Contains(x.Id)).Select(
x => x.UserName).ToListAsync();
userNames = string.Join(",", list);
}
BusinessTaskLog taskLog = new BusinessTaskLog
{
ActionType = ActionType.Create,
BusinessId = task.BusinessId,
BusinessType = task.BusinessType,
CreateBy = long.Parse(User.UserId),
CreateTime = DateTime.Now,
RecvUsers = userNames,
TaskStatus = task.TaskStatus,
TaskType = task.TaskType,
Remark = remark
};
await WriteLogAsync(taskLog);
}
/// <summary>
/// 写入任务日志
/// </summary>
/// <param name="logs">任务日志</param>
/// <exception cref="ArgumentNullException"><paramref name="logs"/>为null</exception>
/// <returns></returns>
public async Task WriteLogAsync(params BusinessTaskLog[] logs)
{
ArgumentNullException.ThrowIfNull(logs, nameof(logs));
await TenantDb.Insertable(logs).ExecuteCommandAsync();
}
}
}

@ -16,7 +16,6 @@ using DS.WMS.Core.TaskPlat.Interface;
using Masuit.Tools;
using Masuit.Tools.Systems;
using Microsoft.Extensions.DependencyInjection;
using Org.BouncyCastle.Crypto;
using SqlSugar;
namespace DS.WMS.Core.Op.Method.TaskInteraction
@ -33,6 +32,11 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// </summary>
protected ITaskManageService ManagerService { get; private set; }
/// <summary>
/// 日志服务
/// </summary>
protected ITaskLogService LogService { get; private set; }
/// <summary>
/// 工作流服务
/// </summary>
@ -45,6 +49,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
public TaskService(IServiceProvider provider) : base(provider)
{
ManagerService = provider.GetRequiredService<ITaskManageService>();
LogService = provider.GetRequiredService<ITaskLogService>();
FlowService = new Lazy<IClientFlowInstanceService>(provider.GetRequiredService<IClientFlowInstanceService>());
}
@ -70,11 +75,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="types">任务类型</param>
/// <returns></returns>
public async Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType)
public async Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types)
{
var list = await TenantDb.Queryable<BusinessTask>().Where(
x => x.BusinessId == id && x.BusinessType == businessType).Select<BusinessTaskDto>().ToListAsync();
var list = await TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id && x.BusinessType == businessType)
.WhereIF(types != null && types.Length > 0, x => types.Contains(x.TaskType))
.Select<BusinessTaskDto>().ToListAsync();
var result = DataResult<List<BusinessTaskDto>>.Success(list);
result.Count = list.Count;
@ -117,15 +124,16 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
await TenantDb.Ado.BeginTranAsync();
try
{
//重置任务为待处理
var result = await SetTaskStatusAsync(new TaskUpdateRequest
var req = new TaskUpdateRequest
{
AutoCreateNext = false,
BusinessId = request.BusinessId,
BusinessType = request.BusinessType,
TaskStatus = TaskStatusEnum.Create,
TaskTypeName = TaskBaseTypeEnum.WAIT_ORDER_AUDIT.ToString()
}, false);
};
//重置任务为待处理
var result = await SetTaskStatusAsync(req, false);
if (!result.Succeeded)
return DataResult.Failed(result.Message, result.MultiCode);
@ -138,6 +146,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
.Where(x => x.BusinessId == request.BusinessId && x.BusinessType == request.BusinessType && x.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
.ExecuteCommandAsync();
//记录日志
await LogService.WriteLogAsync(req, "重新审批");
await TenantDb.Ado.CommitTranAsync();
return result2;
}
@ -309,6 +319,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (!result.Succeeded)
return result;
//记录日志
await LogService.WriteLogAsync(task);
if (useTransaction)
await TenantDb.Ado.CommitTranAsync();
@ -411,12 +424,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (task.TaskStatus != request.TaskStatus)
await OnTaskStatusChanged(request);
task.RejectReason = request.RejectReason;
//更新当前任务状态
task.TaskStatus = request.TaskStatus;
if (task.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
task.FlowId = null;
await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.FlowId }).ExecuteCommandAsync();
await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.FlowId, x.RejectReason }).ExecuteCommandAsync();
if (task.TaskStatus == TaskStatusEnum.Complete)
{
@ -436,6 +450,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
}
}
//记录日志
await LogService.WriteLogAsync(request);
if (useTransaction)
await TenantDb.Ado.CommitTranAsync();
@ -473,14 +490,28 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
long userId = long.Parse(User.UserId);
var users = await GetRecvUsers(userId);
var dt = DateTime.Now;
await ManagerService.SetTaskUserStatus(
callback.BusinessId,
TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
TaskStatusEnum.Complete,
//callback.Status == FlowStatusEnum.Approve ? TaskStatusEnum.Complete : TaskStatusEnum.Pending
DateTime.Now,
dt,
users);
//记录日志
await LogService.WriteLogAsync(new BusinessTaskLog
{
AuditStatus = callback.Status,
BusinessId = callback.BusinessId,
BusinessType = callback.BusinessType.Value,
CreateBy = userId,
CreateTime = dt,
TaskStatus = TaskStatusEnum.Complete,
TaskType = TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
RecvUsers = users.Count > 0 ? users[0].RecvUserName : null
});
}
/// <summary>
@ -493,15 +524,20 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
{
ArgumentNullException.ThrowIfNull(callback, nameof(callback));
//根据审批结果更新任务状态
await SetTaskStatusAsync(new TaskUpdateRequest
var req = new TaskUpdateRequest
{
BusinessId = callback.BusinessId,
BusinessType = callback.BusinessType.Value,
TaskTypeName = TaskBaseTypeEnum.WAIT_ORDER_AUDIT.ToString(),
TaskStatus = callback.FlowStatus == FlowStatusEnum.Approve ? TaskStatusEnum.Complete : TaskStatusEnum.Pending,
AutoCreateNext = false //审批完成后需根据业务需要自定义任务类型,因此设置为不自动创建下一任务
});
};
//根据审批结果更新任务状态
await SetTaskStatusAsync(req);
long userId = long.Parse(User.UserId);
var users = await GetRecvUsers(userId);
string remark = "终审完成,审批结果为:" + callback.FlowStatus.GetDescription();
if (callback.FlowStatus == FlowStatusEnum.Reject)
{
@ -514,7 +550,23 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TaskTypeName = TaskBaseTypeEnum.ORDER_AUDIT_REJECTED.ToString(),
RecvUserIdList = [task.CreateBy] //通知任务发起人
});
remark += ";驳回理由:" + callback.RejectReason;
}
//记录日志
await LogService.WriteLogAsync(new BusinessTaskLog
{
AuditStatus = callback.FlowStatus,
BusinessId = callback.BusinessId,
BusinessType = callback.BusinessType.Value,
CreateBy = userId,
CreateTime = DateTime.Now,
TaskStatus = req.TaskStatus,
TaskType = req.TaskType,
RecvUsers = users.Count > 0 ? users[0].RecvUserName : null,
Remark = remark
});
}
/// <summary>

@ -0,0 +1,21 @@
using DS.WMS.Core.Sys.Entity;
namespace DS.WMS.Core.Sys.Dtos
{
/// <summary>
/// 任务台字段自定义列查询接口的返回Dto
/// </summary>
public class SysFieldSetTaskPlatQueryDtos: SysFieldSet
{
/// <summary>
/// 任务类型Code
/// </summary>
public string TaskTypeCode { get; set; }
/// <summary>
/// 是否为默认配置
/// </summary>
public bool IsDefault { get; set; }
}
}

@ -20,4 +20,13 @@ public class UserFieldSetUpdateReq
/// 字段设置
/// </summary>
public string Content { get; set; }
/// <summary>
/// 任务类型Code
/// </summary>
public string TaskTypeCode { get; set; }
/// <summary>
/// 是否用于设置默认字段
/// </summary>
public bool IsSetDefault { get; set; }
}

@ -30,14 +30,14 @@ public interface ICommonService
/// <returns></returns>
DataResult<List<RouteItem>> GetUserPermissionByToken();
/// <summary>
/// 后台端刷新Token
/// </summary>
/// <returns></returns>
DataResult<RefreshTokenRes> UserRefreshToken();
/// <summary>
/// 客户端刷新Token
/// </summary>
@ -95,7 +95,7 @@ public interface ICommonService
/// </summary>
/// <returns></returns>
public DataResult<List<ApiSelectViewModel>> GetUserList();
/// <summary>
/// 获取机构下拉列表
/// </summary>
@ -123,7 +123,7 @@ public interface ICommonService
/// <returns></returns>
public DataResult ChangePassword(ChangePasswordReq model);
/// <summary>
/// 租户注册
/// </summary>
@ -156,7 +156,7 @@ public interface ICommonService
/// <returns></returns>
public DataResult<List<PermissionTreeList>> GetClientPermissionTreeList();
/// <summary>
/// 获取表及视图
/// </summary>
@ -187,7 +187,7 @@ public interface ICommonService
/// <param name="permissionId"></param>
/// <param name="tagNo">标识序号</param>
/// <returns></returns>
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId, int tagNo = 0);
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId, int tagNo = 0);
/// <summary>
@ -202,8 +202,8 @@ public interface ICommonService
/// </summary>
/// <returns></returns>
public DataResult<string> GetSequenceNext<T>();
/// <summary>
/// 获取字典明细
/// </summary>
@ -261,16 +261,29 @@ public interface ICommonService
/// </summary>
/// <returns></returns>
public DataResult<List<CodeStlModeSelectRes>> GetClientStlModeSelectList();
/// <summary>
/// 获取业务来源下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceSelectRes>> GetClientSourceSelectList();
/// <summary>
/// 获取业务来源明细下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceDetailSelectRes>> GetClientSourceDetailSelectList(string id);
/// <summary>
/// 更新任务台用户字段设置
/// </summary>
Task<DataResult> UpdateUserTaskPlatFieldSet(UserFieldSetUpdateReq req);
/// <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);
}

@ -371,7 +371,7 @@ public class ClientCommonService : IClientCommonService
var carrier = await tenantDb.Queryable<InfoClient>()
.InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt() && b.IsBooking == true)
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt() && b.IsCarrier == true)
.Select((a, b) => new ClientSelectRes
{
Id = a.Id,

@ -39,6 +39,11 @@ public class CommonService : ICommonService
private readonly IWebHostEnvironment _environment;
private readonly ILogger<CommonService> _logger;
/// <summary>
/// 任务台基础表自定义列对应的Code
/// </summary>
private const string TASK_PLAT_BASIC_CODE = "BASIC";
/// <summary>
///
/// </summary>
@ -106,7 +111,7 @@ public class CommonService : ICommonService
TenantName = user.TenantName,
TenantId = tenantId.ToString(),
};
var refreshToken = JwtHelper.Encrypt(tokenModel, true,false);
var refreshToken = JwtHelper.Encrypt(tokenModel, true, false);
var data = db.Queryable<SysUser>().Filter(null, true).Where(x => x.Id == userId)
.Select(a => new CurrentUserViewModel
@ -326,12 +331,12 @@ public class CommonService : ICommonService
{
return DataResult<RefreshTokenRes>.Failed("Token解密失败!");
}
var userId = long.Parse(result["jti"]);
var userInfo = db.Queryable<SysUser>().Filter(null, true).First(x => x.Id == userId);
var tenantId = result["TenantId"];
var orgId = result["OrgId"];
var tokenModel = new JwtHelper.JwtTokenModel
{
Uid = userId.ToString(),
@ -342,7 +347,7 @@ public class CommonService : ICommonService
};
var data = new RefreshTokenRes
{
AccessToken = JwtHelper.Encrypt(tokenModel,false,true),
AccessToken = JwtHelper.Encrypt(tokenModel, false, true),
RefreshToken = JwtHelper.Encrypt(tokenModel, true, true)
};
return DataResult<RefreshTokenRes>.Success(data);
@ -621,7 +626,7 @@ public class CommonService : ICommonService
foreach (var item in list)
{
var childs =await db.Queryable<SysPermission>().Filter(null, true)
var childs = await db.Queryable<SysPermission>().Filter(null, true)
.Where(x => (x.MenuType == 1 || x.MenuType == 2) && x.ParentId == item.Id && x.IsHidden == false &&
(x.PermissionType == 1 || x.PermissionType == 0))
.OrderBy(x => x.SortCode)
@ -797,13 +802,13 @@ public class CommonService : ICommonService
//排序
grandsons = grandsons.OrderBy(x => x.SortCode).ToList();
child.Children = grandsons;
}
}
}
item.Children = childs;
}
}
@ -817,20 +822,21 @@ public class CommonService : ICommonService
/// 获取客户端按钮权限
/// </summary>
/// <returns></returns>
public async Task<DataResult<string[]>> GetClientUserPermissionCode() {
var userId = long.Parse(user.UserId);
public async Task<DataResult<string[]>> GetClientUserPermissionCode()
{
var userId = long.Parse(user.UserId);
var roleList = await db.Queryable<SysRoleUser>()
.Where(x => x.UserId == userId).Select(n => n.RoleId).ToListAsync();
.Where(x => x.UserId == userId).Select(n => n.RoleId).ToListAsync();
roleList.Distinct();
var list =await db.Queryable<SysRolePermission>().Where(a => roleList.Contains(a.RoleId) && a.IsPermission == 1)
.InnerJoin<SysPermission>((a,b)=>a.PermissionId == b.Id)
var list = await db.Queryable<SysRolePermission>().Where(a => roleList.Contains(a.RoleId) && a.IsPermission == 1)
.InnerJoin<SysPermission>((a, b) => a.PermissionId == b.Id)
.Where((a, b) => b.MenuType == 3)
.Select((a, b) => b.PermissionCode
).ToArrayAsync();
return await Task.FromResult(DataResult<string[]>.Success("获取数据成功!", list));
}
@ -869,7 +875,7 @@ public class CommonService : ICommonService
EnTitle = a.PermissionEnName,
Key = a.Id,
Icon = a.Icon
}).ToList();
}).ToList();
foreach (var child in childs)
{
var grandsons = db.Queryable<SysPermission>().Where(x => x.MenuType == 2 && x.ParentId == child.Key)
@ -941,7 +947,7 @@ public class CommonService : ICommonService
/// <returns></returns>
public DataResult<List<ApiSelectViewModel>> GetOrgList()
{
var list = db.Queryable<SysOrg>().Where(a=>a.Status == StatusEnum.Enable && a.IsDepartment == false)
var list = db.Queryable<SysOrg>().Where(a => a.Status == StatusEnum.Enable && a.IsDepartment == false)
.Select(a => new ApiSelectViewModel
{
Label = a.OrgName,
@ -1312,7 +1318,7 @@ public class CommonService : ICommonService
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public List<IConditionalModel> GetOperationRuleConditional<T>()
{
{
var userInfo = db.Queryable<SysUser>().First(x => x.Id == long.Parse(user.UserId));
if (userInfo.UserType == 0)
{
@ -1344,13 +1350,13 @@ public class CommonService : ICommonService
.ToList();
orgs.Sort();
rule.DataRules = rule.DataRules.Replace(DataRuleConst.LoginOrg, string.Join(',', orgs));
}
}
var conditions = rule.DataRules.ConvertSqlSugarExpression();
var conditionalModels =
db.ConfigQuery.Context.Utilities.JsonToConditionalModels(
JsonConvert.SerializeObject(conditions));
return conditionalModels;
}
}
#region 获取数据库表及字段属性
@ -1417,6 +1423,80 @@ public class CommonService : ICommonService
return DataResult<SysFieldSet>.Success(info);
}
/// <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)
{
if (taskTypeCodeArray == null || taskTypeCodeArray.Length == 0)
{
return DataResult<List<SysFieldSetTaskPlatQueryDtos>>.Success(null);
}
long userId = long.Parse(user.UserId);
Dictionary<int, string> tagNoDic = new(taskTypeCodeArray.Length);
foreach (var item in taskTypeCodeArray)
{
if (item.ToUpper() == TASK_PLAT_BASIC_CODE)
{
var typeInt = -1;
if (!tagNoDic.ContainsKey(typeInt))
{
tagNoDic.Add(typeInt, TASK_PLAT_BASIC_CODE);
}
}
else
{
if (Enum.TryParse(typeof(TaskBaseTypeEnum), item, out object? typeEnum))
{
var typeInt = (int)typeEnum;
if (!tagNoDic.ContainsKey(typeInt))
{
tagNoDic.Add(typeInt, item);
}
}
}
}
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)
.ToListAsync();
var result = new List<SysFieldSetTaskPlatQueryDtos>();
foreach (var item in tagNoDic)
{
var temp = infoList.FirstOrDefault(x => x.TagNo == item.Key && x.UserId == userId);
if (temp != null)
{
temp.IsDefault = false;
temp.TaskTypeCode = item.Value;
result.Add(temp);
}
else
{
temp = infoList.FirstOrDefault(x => x.TagNo == item.Key);
if (temp != null)
{
temp.IsDefault = true;
temp.TaskTypeCode = item.Value;
result.Add(temp);
}
}
}
return DataResult<List<SysFieldSetTaskPlatQueryDtos>>.Success(result);
}
/// <summary>
/// 更新用户字段设置
/// </summary>
@ -1447,6 +1527,50 @@ public class CommonService : ICommonService
return DataResult.Successed("更新成功");
}
/// <summary>
/// 更新任务台用户字段设置
/// </summary>
public async Task<DataResult> UpdateUserTaskPlatFieldSet(UserFieldSetUpdateReq req)
{
int tagNo;
if (req.TaskTypeCode.ToUpper() == TASK_PLAT_BASIC_CODE)
{
tagNo = -1;
}
else if (Enum.TryParse(typeof(TaskBaseTypeEnum), req.TaskTypeCode, out object? type))
{
tagNo = (int)type;
}
else
{
throw new Exception(nameof(req.TaskTypeCode) + "取值有误:" + req.TaskTypeCode);
}
var info = await db.Queryable<SysFieldSet>()
.Where(x => x.PermissionId == req.PermissionId && x.TagNo == tagNo)
.WhereIF(req.IsSetDefault, x => x.UserId == 0)
.WhereIF(!req.IsSetDefault, x => x.UserId == long.Parse(user.UserId))
.FirstAsync();
if (info.IsNull())
{
var entity = new SysFieldSet
{
UserId = req.IsSetDefault ? 0 : long.Parse(user.UserId),
TagNo = tagNo,
PermissionId = req.PermissionId,
Content = req.Content
};
await db.Insertable(entity).ExecuteCommandAsync();
}
else
{
info.Content = req.Content;
await db.Updateable(info).ExecuteCommandAsync();
}
return DataResult.Successed("更新成功");
}
#endregion
#region 获取字典值
@ -1482,8 +1606,8 @@ public class CommonService : ICommonService
if (db.Queryable<SysDictData>().Where(x => x.TypeId == type.Id && x.Status == StatusEnum.Enable && string.IsNullOrEmpty(x.EnName)).Any())
{
//return DataResult.Failed(string.Format("未配置语言代码:{0}下的字典代码:{1}", language, code), MultiLanguageConst.DictCodeLanguageNoConfig);
return DataResult.FailedWithPlaceholder(db,IhttpContext, MultiLanguageConst.DictCodeLanguageNoConfig, language,code);
return DataResult.FailedWithPlaceholder(db, IhttpContext, MultiLanguageConst.DictCodeLanguageNoConfig, language, code);
}
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == type.Id && x.Status == StatusEnum.Enable)
.Select(x => new DropDownData
@ -1553,7 +1677,7 @@ public class CommonService : ICommonService
// Name = x.EnName,
// Value = x.Value,
// }).ToList();
return DataResult.Successed("获取字典成功!", dictValues);
}
@ -1572,7 +1696,7 @@ public class CommonService : ICommonService
var codes = model.Code.Split(',');
if (codes.Length==0)
if (codes.Length == 0)
{
return DataResult<List<DictOptions>>.Failed("请传入正确的字典代码!");
}
@ -1583,23 +1707,23 @@ public class CommonService : ICommonService
foreach (var item in types)
{
var dictValues = new List<DropDownData>();
var dictValues = new List<DropDownData>();
if (language == "CN")
{
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable)
.Select<DropDownData>().ToList();
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable)
.Select<DropDownData>().ToList();
}
else if (language == "EN")
{
{
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable)
.Select(x => new DropDownData
{
Name = x.EnName,
Value = x.Value,
}).ToList();
}).ToList();
}
else if (language == "AR")
{
{
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable)
.Select(x => new DropDownData
{
@ -1627,7 +1751,7 @@ public class CommonService : ICommonService
}
else if (language == "ES")
{
dictValues = db.Queryable<SysDictData>().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable)
.Select(x => new DropDownData
{

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-07-24T08:45:58.2272340Z||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History>
<History>True|2024-08-05T03:37:07.3133020Z||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -26,7 +26,7 @@ public class CommonController : ApiController
_invokeService = invokeService;
}
/// <summary>
/// 登出
/// </summary>
@ -37,7 +37,7 @@ public class CommonController : ApiController
{
return DataResult<string>.Success("");
}
/// <summary>
/// 用户登录-客户端
/// </summary>
@ -96,7 +96,7 @@ public class CommonController : ApiController
/// <returns></returns>
[HttpGet]
[Route("ChangeOrg")]
public DataResult<RefreshTokenRes> ChangeOrg([FromQuery]string id)
public DataResult<RefreshTokenRes> ChangeOrg([FromQuery] string id)
{
var res = _invokeService.ChangeOrg(id);
return res;
@ -112,7 +112,7 @@ public class CommonController : ApiController
var res = await _invokeService.GetClientUserInfo();
return res;
}
/// <summary>
/// 查询用户拥有的菜单权限-客户端
/// </summary>
@ -157,7 +157,7 @@ public class CommonController : ApiController
var res = _invokeService.GetUserList();
return res;
}
/// <summary>
/// 获取机构下拉选项
/// </summary>
@ -169,7 +169,7 @@ public class CommonController : ApiController
var res = _invokeService.GetOrgList();
return res;
}
/// <summary>
/// 获取商品类型下拉选项
/// </summary>
@ -315,7 +315,7 @@ public class CommonController : ApiController
return res;
}
/// <summary>
/// 企业用户注册
/// </summary>
@ -330,7 +330,7 @@ public class CommonController : ApiController
return res;
}
/// <summary>
/// 获取权限树列表-客户端
/// </summary>
@ -355,7 +355,7 @@ public class CommonController : ApiController
var res = _invokeService.GetDataRuleEntityFields(permissionId);
return res;
}
/// <summary>
/// 获取客户数据权限列表
/// </summary>
@ -378,7 +378,7 @@ public class CommonController : ApiController
var res = _invokeService.GetTables();
return res;
}
/// <summary>
/// 获取数据库表及视图名
/// </summary>
@ -427,8 +427,21 @@ public class CommonController : ApiController
var res = _invokeService.GetUserFieldSet(permissionId, tagNo);
return res;
}
/// <summary>
/// 批量获取任务台用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="isGetDefault">是否获取默认配置 false仅获取默认配置 true如果存在个人配置优先获取个人配置否则获取默认配置</param>
/// <param name="taskTypeCodeArray">任务类型Code</param>
[HttpGet]
[Route("GetUserTaskPlatFieldSet")]
public async Task<DataResult<List<SysFieldSetTaskPlatQueryDtos>>> GetUserTaskPlatFieldSet([FromQuery] string permissionId, [FromQuery] bool isGetDefault, [FromQuery] string[] taskTypeCodeArray)
{
var res = await _invokeService.GetUserTaskPlatFieldSet(permissionId, isGetDefault, taskTypeCodeArray);
return res;
}
/// <summary>
/// 更新用户字段设置
/// </summary>
@ -441,16 +454,26 @@ public class CommonController : ApiController
var res = _invokeService.UpdateUserFieldSet(req);
return res;
}
/// <summary>
/// 更新任务台用户字段设置
/// </summary>
[HttpPost]
[Route("UpdateUserTaskPlatFieldSet")]
public async Task<DataResult> UpdateUserTaskPlatFieldSet([FromBody] UserFieldSetUpdateReq req)
{
var res = await _invokeService.UpdateUserTaskPlatFieldSet(req);
return res;
}
/// <summary>
/// 获取字典下拉明细
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("GetDictTypeDropDown")]
[Route("GetDictTypeDropDown")]
public DataResult GetDictTypeDropDown([FromBody] DropDownDictTypeInput model)
{
{
var res = _invokeService.GetDictTypeDropDown(model);
return res;
}
@ -460,9 +483,9 @@ public class CommonController : ApiController
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("GetDictOptions")]
[Route("GetDictOptions")]
public DataResult<List<DictOptions>> GetDictOptions([FromBody] DropDownDictTypeInput model)
{
{
var res = _invokeService.GetDictOptions(model);
return res;
}

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>

@ -4,7 +4,9 @@ using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using Mapster.Utils;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.OpApi.Controllers
@ -30,11 +32,29 @@ namespace DS.WMS.OpApi.Controllers
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="taskTypes">任务类型名称(可选)</param>
/// <returns></returns>
[HttpGet, Route("GetList")]
public async Task<DataResult<List<BusinessTaskDto>>> GetListAsync([FromQuery]long businessId, [FromQuery] BusinessType businessType)
public async Task<DataResult<List<BusinessTaskDto>>> GetListAsync(
[FromQuery] long businessId,
[FromQuery] BusinessType businessType,
[FromQuery] params string[] taskTypes)
{
return await taskService.GetTasks(businessId, businessType);
var types = taskTypes.Select(Enum<TaskBaseTypeEnum>.Parse).ToArray();
return await taskService.GetTasks(businessId, businessType, types);
}
/// <summary>
/// 获取指定业务的任务日志
/// </summary>
/// <param name="logService"></param>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
[HttpGet, Route("GetLogs")]
public async Task<DataResult<List<BusinessTaskLog>>> GetLogsAsync([FromServices] ITaskLogService logService, [FromQuery] long businessId, [FromQuery] BusinessType businessType)
{
return await logService.ReadLogAsync(businessId, businessType);
}
/// <summary>
@ -71,7 +91,7 @@ namespace DS.WMS.OpApi.Controllers
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("SubmitAudit")]
public async Task<DataResult> SubmitAuditAsync(TaskRequest request)
public async Task<DataResult> SubmitAuditAsync(TaskRequest request)
{
return await taskService.SubmitAuditAsync(request);
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>

@ -88,27 +88,17 @@ public class ContainerManagementTest
//tenantDb.CodeFirst.InitTables(typeof(CM_CurrentState));
//tenantDb.CodeFirst.InitTables(typeof(CM_BaseInfo));
tenantDb.CodeFirst.InitTables(typeof(CM_State_Change));
//tenantDb.CodeFirst.InitTables(typeof(CM_State_Change));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentIn));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentIn_Detail));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentOut));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentOut_Detail));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentOneWay));
//tenantDb.CodeFirst.InitTables(typeof(CM_RentOneWay_Detail));
//tenantDb.CodeFirst.InitTables(typeof(BookingStatusLog));
//tenantDb.CodeFirst.InitTables(typeof(BookingStatus));
//tenantDb.CodeFirst.InitTables(typeof(BookingStatusLogDetail));
//tenantDb.CodeFirst.InitTables(typeof(BusinessOrderContact));
//tenantDb.CodeFirst.InitTables(typeof(BusinessTruck));
//tenantDb.CodeFirst.InitTables(typeof(BusinessTruckCtn));
//tenantDb.CodeFirst.InitTables(typeof(BusinessYard));
////tenantDb.CodeFirst.InitTables(typeof(OpCtn));
//tenantDb.CodeFirst.InitTables(typeof(OpCtnDetail));
//tenantDb.CodeFirst.InitTables(typeof(OpFile));
////tenantDb.CodeFirst.InitTables(typeof(SeaExport));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportBillManage));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportBillManageCtn));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportEdi));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportRemark));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBill));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillCtn));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillPartCtn));
//tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillTemplate));
//db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn));
Assert.True(true);
}
@ -133,7 +123,7 @@ public class ContainerManagementTest
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
tenantDb.CodeFirst.InitTables(types);
//tenantDb.CodeFirst.InitTables(types);
Assert.True(true);
}
[Fact]
@ -145,7 +135,7 @@ public class ContainerManagementTest
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
tenantDb.CodeFirst.InitTables(types);
//tenantDb.CodeFirst.InitTables(types);
Assert.True(true);
}
[Fact]
@ -235,7 +225,7 @@ public class ContainerManagementTest
//tenantDb.CodeFirst.InitTables(typeof(BookingLabel));
//tenantDb.CodeFirst.InitTables(typeof(BookingLabelAllocation));
tenantDb.CodeFirst.InitTables(typeof(InfoClient));
//tenantDb.CodeFirst.InitTables(typeof(InfoClient));
//tenantDb.CodeFirst.InitTables(typeof(CodeThirdParty));
//tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail));
//db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn));
@ -252,7 +242,7 @@ public class ContainerManagementTest
var ass = Assembly.Load("DS.WMS.Core");
var types = ass.GetTypes().Where(it => it.FullName?.Contains("DS.WMS.Core.TaskPlat.Entity") == true).ToArray();
tenantDb.CodeFirst.InitTables(types);
//tenantDb.CodeFirst.InitTables(types);
//tenantDb.CodeFirst.InitTables(typeof(TaskFlowLog));
//tenantDb.CodeFirst.InitTables(typeof(TaskFlowLogDetail));

@ -0,0 +1,85 @@
using System.Reflection;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
using DS.WMS.Core.Check.Entity;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.BookingSlot;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.TaskPlat.Entity;
using Mapster;
using Masuit.Tools.Strings;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Owin.BuilderProperties;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Org.BouncyCastle.Ocsp;
using SqlSugar;
using SqlSugar.IOC;
using Xunit;
namespace Ds.WMS.Test;
public class SaasDBUpdateTest
{
private readonly IServiceProvider _serviceProvider;
private readonly SqlSugarScope db;
private readonly ISaasDbService saasService;
public SaasDBUpdateTest(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = (SqlSugarScope)_serviceProvider.GetRequiredService<ISqlSugarClient>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
/// <summary>
/// 主库初始化单表
/// </summary>
[Fact]
public void MasterInitTableTest()
{
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
db.CodeFirst.InitTables(typeof(SysPrintTemplate));
Assert.True(true);
}
/// <summary>
/// 初始化单表 多表
/// 注意 海运出口 SeaExport 得手动数据库更新
/// </summary>
[Fact]
public void InitSaasTableTestByCjy()
{
var tenantList = db.Queryable<DS.Module.SqlSugar.SysTenantLink>().ToList();
var ass = Assembly.Load("DS.WMS.Core");
//var types = ass.GetTypes().Where(it => it.FullName?.Contains("DS.WMS.Core.TaskPlat.Entity") == true).ToArray();
foreach (var item in tenantList)
{
var tenantDb = saasService.GetBizDbScopeById(item.TenantId).CopyNew();
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci"; //较高版本支持
//tenantDb.CodeFirst.InitTables(types); //指定表空间下的实体
tenantDb.CodeFirst.InitTables(typeof(OpLetterYard));//指定更新特定实体
}
Assert.True(true);
}
/// <summary>
/// 初始化单表
/// </summary>
[Fact]
public void InitTableTestZXF()
{
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
var ass = Assembly.Load("DS.WMS.Core");
var types = ass.GetTypes().Where(it => it.FullName?.Contains("DS.WMS.Core.TaskPlat.Entity") == true).ToArray();
tenantDb.CodeFirst.InitTables(types);
//tenantDb.CodeFirst.InitTables(typeof(TaskFlowLog));
//tenantDb.CodeFirst.InitTables(typeof(TaskFlowLogDetail));
Assert.True(true);
}
}
Loading…
Cancel
Save