diff --git a/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj b/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj index d171a11a..61de876f 100644 --- a/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj +++ b/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj @@ -7,6 +7,7 @@ + diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoReq.cs index d9a62b6a..b7b52be1 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoReq.cs @@ -18,6 +18,10 @@ public class CM_BaseInfoReq /// public string Cntrno { get; set; } + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoRes.cs index 0b711fe2..33c86fe8 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_BaseInfoRes.cs @@ -16,7 +16,10 @@ public class CM_BaseInfoRes /// Desc:集装箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs index 6f1d221b..70e13925 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs @@ -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 /// 集装箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } // /// Desc:箱型 /// @@ -33,21 +38,24 @@ public class CM_CurrentStateReq /// public string CtnOwner { get; set; } - /// - /// Desc:业务所属分部 + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string Corpid { get; set; } - + public CM_CtnSourceEnum? CtnSourceId { get; set; } /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string CtnSource { get; set; } + public string CtnSource => CtnSourceId?.GetDescription(); + + /// + /// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱 + /// + public CM_CtnBizStateEnum? CtnBizStateId { get; set; } /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// - public string CtnBizState { get; set; } = "0"; + public string CtnBizState { get; set; } /// /// Desc:箱业务编号:当前 @@ -59,10 +67,15 @@ public class CM_CurrentStateReq /// public string CtnReleaseNo { get; set; } + + /// + /// Desc:箱状态Id + /// + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// - public string CtnState { get; set; } + public string CtnState => CtnStateId?.GetDescription(); /// /// Desc:箱损坏/维修状态 @@ -70,18 +83,26 @@ public class CM_CurrentStateReq public string CtnBreakState { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; /// /// Desc:是否上线(是否管理中) /// - public Int16 IsOnline { get; set; } = 0; + public string IsOnline => IsOnlineId?.GetDescription(); /// /// Desc:空重箱 /// public bool? IsHeavy { get; set; } = false; /// - /// Desc:当前港口 + /// Desc:当前港口代码 /// public string Portid { get; set; } + /// + /// Desc:当前港口 + /// + public string Port { get; set; } /// /// Desc:码头或场站 @@ -100,7 +121,11 @@ public class CM_CurrentStateReq /// - /// Desc:业务委托单位 + /// 业务委托单位Id + /// + public long CustomerId { get; set; } + /// + /// 业务委托单位 /// public string CustomerName { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs index e22b00a7..d50192f8 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs @@ -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 /// 集装箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } // /// Desc:箱型 /// @@ -33,19 +38,22 @@ public class CM_CurrentStateRes public string CtnOwner { get; set; } /// - /// Desc:业务所属分部 + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string Corpid { get; set; } - + public CM_CtnSourceEnum? CtnSourceId { get; set; } /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string CtnSource { get; set; } + public string CtnSource => CtnSourceId?.GetDescription(); + /// + /// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱 + /// + public CM_CtnBizStateEnum? CtnBizStateId { get; set; } /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// - public string CtnBizState { get; set; } = "0"; + public string CtnBizState { get; set; } /// /// Desc:箱业务编号:当前 @@ -57,10 +65,14 @@ public class CM_CurrentStateRes /// public string CtnReleaseNo { get; set; } + /// + /// Desc:箱状态Id + /// + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// - public string CtnState { get; set; } + public string CtnState => CtnStateId?.GetDescription(); /// /// Desc:箱损坏/维修状态 @@ -68,18 +80,28 @@ public class CM_CurrentStateRes public string CtnBreakState { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; /// /// Desc:是否上线(是否管理中) /// - public Int16 IsOnline { get; set; } = 0; + public string IsOnline => IsOnlineId?.GetDescription(); + + /// /// Desc:空重箱 /// public bool? IsHeavy { get; set; } = false; /// - /// Desc:当前港口 + /// Desc:当前港口代码 /// public string Portid { get; set; } + /// + /// Desc:当前港口 + /// + public string Port { get; set; } /// /// Desc:码头或场站 @@ -98,7 +120,11 @@ public class CM_CurrentStateRes /// - /// Desc:业务委托单位 + /// 业务委托单位Id + /// + public long CustomerId { get; set; } + /// + /// 业务委托单位 /// public string CustomerName { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInReq.cs index 251c2dbe..4298d0f5 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInReq.cs @@ -22,7 +22,7 @@ public class CM_RentInReq public BusinessType BusinessType { get; set; } = BusinessType.CM_RentIn; /// - /// Desc:租箱退租 + /// Desc:租箱业务 /// public string RentDirect { get; set; } @@ -37,44 +37,36 @@ public class CM_RentInReq public string BillState { get; set; } /// - /// Desc:业务所属分部 + /// Desc:原箱主Id /// - [SugarColumn(ColumnDescription = "业务所属分部", IsNullable = true, Length = 50)] - public string Corpid { get; set; } - + public long? OldContainerOwnerId { get; set; } /// /// Desc:原箱主 /// - [SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)] public string OldContainerOwner { get; set; } /// /// Desc:业务日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] public DateTime? Bsdate { get; set; } /// /// Desc:会计期间 /// - [SugarColumn(ColumnDescription = "会计期间", IsNullable = true, Length = 7)] public string Accdate { get; set; } /// /// Desc:是否业务锁定 /// - [SugarColumn(ColumnDescription = "是否业务锁定", DefaultValue = "0")] public bool? IsBusinessLocking { get; set; } = false; /// /// Desc:是否费用锁定 /// - [SugarColumn(ColumnDescription = "是否费用锁定", DefaultValue = "0")] public bool? IsFeeLocking { get; set; } = false; /// /// Desc:备注 /// - [SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)] public string Remark { get; set; } } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInRes.cs index f5410288..6008861f 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentInRes.cs @@ -14,28 +14,58 @@ public class CM_RentInRes /// public long Id { get; set; } /// - /// Desc:集装箱号 + /// Desc:租箱业务号 /// - public string Cntrno { get; set; } + public string Custno { get; set; } + public BusinessType BusinessType { get; set; } = BusinessType.CM_RentIn; /// - /// Desc:箱型 + /// Desc:租箱业务 + /// + public string RentDirect { get; set; } + + /// + /// Desc:租箱类型 长租短租单程 + /// + public string RentType { get; set; } + + /// + /// Desc:业务状态 + /// + public string BillState { get; set; } + + /// + /// Desc:原箱主Id + /// + public long? OldContainerOwnerId { get; set; } + /// + /// Desc:原箱主 /// - public string Ctnall { get; set; } + public string OldContainerOwner { get; set; } + /// - /// Desc:箱皮重 + /// Desc:业务日期 /// - public decimal? CtnWeight { get; set; } + public DateTime? Bsdate { get; set; } /// - /// Desc:箱生产时间 + /// Desc:会计期间 + /// + public string Accdate { get; set; } + + /// + /// Desc:是否业务锁定 + /// + public bool? IsBusinessLocking { get; set; } = false; + /// + /// Desc:是否费用锁定 /// - public DateTime? ProductionDate { get; set; } + public bool? IsFeeLocking { get; set; } = false; /// - /// Desc:箱初期成本 + /// Desc:备注 /// - public decimal? CtnValue_Base { get; set; } + public string Remark { get; set; } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailReq.cs index d066f9b8..4d2afabc 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailReq.cs @@ -28,13 +28,19 @@ public class CM_RentIn_DetailReq /// Desc:箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// public string Ctnall { get; set; } - + /// + /// Desc:原箱主Id + /// + public long? OldContainerOwnerId { get; set; } /// /// Desc:原箱主 /// @@ -72,7 +78,7 @@ public class CM_RentIn_DetailReq /// /// Desc:开始计费日期 /// - public string FeeStartDate { get; set; } + public DateTime? FeeStartDate { get; set; } /// /// Desc:币别 @@ -107,16 +113,24 @@ public class CM_RentIn_DetailReq /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + public string PickupPort { get; set; } + /// + /// Desc:还箱港口代码 + /// + public string DropoffPortid { get; set; } /// /// Desc:还箱港口 /// - public string DropoffPortid { get; set; } + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailRes.cs index ab863def..7a020a17 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentIn_DetailRes.cs @@ -27,13 +27,19 @@ public class CM_RentIn_DetailRes /// Desc:箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// public string Ctnall { get; set; } - + /// + /// Desc:原箱主Id + /// + public long? OldContainerOwnerId { get; set; } /// /// Desc:原箱主 /// @@ -71,7 +77,7 @@ public class CM_RentIn_DetailRes /// /// Desc:开始计费日期 /// - public string FeeStartDate { get; set; } + public DateTime? FeeStartDate { get; set; } /// /// Desc:币别 @@ -107,16 +113,24 @@ public class CM_RentIn_DetailRes /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + public string PickupPort { get; set; } + /// + /// Desc:还箱港口代码 + /// + public string DropoffPortid { get; set; } /// /// Desc:还箱港口 /// - public string DropoffPortid { get; set; } + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutReq.cs index 3190c01a..48c2adbe 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutReq.cs @@ -22,7 +22,7 @@ public class CM_RentOutReq public BusinessType BusinessType { get; set; } = BusinessType.CM_RentOut; /// - /// Desc:租箱退租 + /// Desc:租箱业务 /// public string RentDirect { get; set; } @@ -37,14 +37,13 @@ public class CM_RentOutReq public string BillState { get; set; } /// - /// Desc:业务所属分部 + /// Desc:租箱客户Id /// - public string Corpid { get; set; } - + public long RentCustomerId { get; set; } /// /// Desc:租箱客户 /// - public string RentCustomername { get; set; } + public string RentCustomerName { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutRes.cs index c5a322ff..083071b2 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOutRes.cs @@ -21,7 +21,7 @@ public class CM_RentOutRes public BusinessType BusinessType { get; set; } = BusinessType.CM_RentOut; /// - /// Desc:租箱退租 + /// Desc:租箱业务 /// public string RentDirect { get; set; } @@ -36,14 +36,13 @@ public class CM_RentOutRes public string BillState { get; set; } /// - /// Desc:业务所属分部 + /// Desc:租箱客户Id /// - public string Corpid { get; set; } - + public long RentCustomerId { get; set; } /// /// Desc:租箱客户 /// - public string RentCustomername { get; set; } + public string RentCustomerName { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailReq.cs index 6015d7cd..3b22c5ad 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailReq.cs @@ -28,7 +28,10 @@ public class CM_RentOut_DetailReq /// Desc:箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// @@ -107,16 +110,24 @@ public class CM_RentOut_DetailReq /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + public string PickupPort { get; set; } + /// + /// Desc:还箱港口代码 + /// + public string DropoffPortid { get; set; } /// /// Desc:还箱港口 /// - public string DropoffPortid { get; set; } + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailRes.cs index e6ffa889..55836297 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOut_DetailRes.cs @@ -27,7 +27,10 @@ public class CM_RentOut_DetailRes /// Desc:箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } /// /// Desc:箱型 /// @@ -106,16 +109,24 @@ public class CM_RentOut_DetailRes /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + public string PickupPort { get; set; } + /// + /// Desc:还箱港口代码 + /// + public string DropoffPortid { get; set; } /// /// Desc:还箱港口 /// - public string DropoffPortid { get; set; } + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeReq.cs index 351188c0..cc473b2c 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeReq.cs @@ -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 /// 集装箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } // /// Desc:箱型 /// public string Ctnall { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; /// /// Desc:是否上线(是否管理中) /// - public Int16 IsOnline { get; set; } = 0; - - + public string IsOnline => IsOnlineId?.GetDescription(); + + /// + /// Desc:变动来源 用于表示此变动来自哪个业务模块 + /// + public CMChangeSourceEnum? ChangeSourceId { get; set; } /// /// Desc:变动来源 用于表示此变动来自哪个业务模块 /// - public string ChangeSource { get; set; } + public string ChangeSource => ChangeSourceId?.GetDescription(); /// /// Desc:新旧箱 空白/used/new @@ -48,19 +60,22 @@ public class CM_State_ChangeReq /// - /// Desc:业务所属分部 + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string Corpid { get; set; } - + public CM_CtnSourceEnum? CtnSourceId { get; set; } /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string CtnSource { get; set; } + public string CtnSource => CtnSourceId?.GetDescription(); + /// + /// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱 + /// + public CM_CtnBizStateEnum? CtnBizStateId { get; set; } /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// - public string CtnBizState { get; set; } = "0"; + public string CtnBizState { get; set; } /// /// Desc:箱业务编号:当前 @@ -72,10 +87,14 @@ public class CM_State_ChangeReq /// public string CtnReleaseNo { get; set; } + /// + /// Desc:箱状态Id + /// + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// - public string CtnState { get; set; } + public string CtnState => CtnStateId?.GetDescription(); /// /// Desc:箱损坏/维修状态 @@ -88,10 +107,15 @@ public class CM_State_ChangeReq public bool? IsHeavy { get; set; } = false; /// - /// Desc:当前港口 + /// Desc:当前港口代码 /// public string Portid { get; set; } + /// + /// Desc:当前港口 + /// + public string Port { get; set; } + /// /// Desc:码头或场站 /// @@ -109,7 +133,11 @@ public class CM_State_ChangeReq /// - /// Desc:业务委托单位 + /// 业务委托单位Id + /// + public long CustomerId { get; set; } + /// + /// 业务委托单位 /// public string CustomerName { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeRes.cs index 3cc508fc..9a5bdf5a 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_State_ChangeRes.cs @@ -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 /// 集装箱号 /// public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + public string CtnCode { get; set; } // /// Desc:箱型 /// public string Ctnall { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; /// /// Desc:是否上线(是否管理中) /// - public Int16 IsOnline { get; set; } = 0; + public string IsOnline => IsOnlineId?.GetDescription(); /// /// Desc:新旧箱 空白/used/new @@ -38,19 +47,22 @@ public class CM_State_ChangeRes public string CtnOwner { get; set; } /// - /// Desc:业务所属分部 + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string Corpid { get; set; } - + public CM_CtnSourceEnum? CtnSourceId { get; set; } /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// - public string CtnSource { get; set; } + public string CtnSource => CtnSourceId?.GetDescription(); + /// + /// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱 + /// + public CM_CtnBizStateEnum? CtnBizStateId { get; set; } /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// - public string CtnBizState { get; set; } = "0"; + public string CtnBizState { get; set; } /// /// Desc:箱业务编号:当前 @@ -62,10 +74,14 @@ public class CM_State_ChangeRes /// public string CtnReleaseNo { get; set; } + /// + /// Desc:箱状态Id + /// + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// - public string CtnState { get; set; } + public string CtnState => CtnStateId?.GetDescription(); /// /// Desc:箱损坏/维修状态 @@ -78,10 +94,15 @@ public class CM_State_ChangeRes public bool? IsHeavy { get; set; } = false; /// - /// Desc:当前港口 + /// Desc:当前港口代码 /// public string Portid { get; set; } + /// + /// Desc:当前港口 + /// + public string Port { get; set; } + /// /// Desc:码头或场站 /// @@ -97,9 +118,12 @@ public class CM_State_ChangeRes /// public string Mblno { get; set; } - /// - /// Desc:业务委托单位 + /// 业务委托单位Id + /// + public long CustomerId { get; set; } + /// + /// 业务委托单位 /// public string CustomerName { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_BaseInfo.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_BaseInfo.cs index b1396510..2d04f6a4 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_BaseInfo.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_BaseInfo.cs @@ -16,7 +16,11 @@ public class CM_BaseInfo : BaseOrgModel /// [SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)] public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } /// /// Desc:箱型 /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs index e3aa9018..fd8c469e 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs @@ -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 /// [SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)] public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } /// /// Desc:箱型 /// @@ -32,7 +37,7 @@ public class CM_CurrentState : BaseOrgModel /// /// 箱主Id /// - [SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = false, DefaultValue = "0")] + [SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = true, DefaultValue = "0")] public long CtnOwnerId { get; set; } /// /// Desc:箱主 t_info_client CUSTNAME @@ -40,17 +45,31 @@ public class CM_CurrentState : BaseOrgModel [SugarColumn(ColumnDescription = "箱主", IsNullable = true, Length = 50)] public string CtnOwner { get; set; } + + + /// + /// Desc:箱来源Id: 自有箱/短租租入/长租租入/买箱 + /// + [SugarColumn(ColumnDescription = "箱来源Id", IsNullable = true, Length = 20)] + public CM_CtnSourceEnum? CtnSourceId { get; set; } + /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 /// [SugarColumn(ColumnDescription = "箱来源", IsNullable = true, Length = 20)] public string CtnSource { get; set; } + /// + /// Desc:箱业务状态id: 短租租出 长租租出 单程 卖箱 + /// + [SugarColumn(ColumnDescription = "箱业务状态Id", IsNullable = true)] + public CM_CtnBizStateEnum? CtnBizStateId { get; set; } + /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// [SugarColumn(ColumnDescription = "箱业务状态", IsNullable = true, DefaultValue = "")] - public string CtnBizState { get; set; } = "0"; + public string CtnBizState { get; set; } /// /// Desc:箱业务编号:当前 @@ -63,7 +82,11 @@ public class CM_CurrentState : BaseOrgModel /// [SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)] public string CtnReleaseNo { get; set; } - + /// + /// Desc:箱状态Id + /// + [SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true, Length = 20)] + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// @@ -76,11 +99,18 @@ public class CM_CurrentState : BaseOrgModel [SugarColumn(ColumnDescription = "箱损坏/维修状态", IsNullable = true, Length = 20)] public string CtnBreakState { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + [SugarColumn(ColumnDescription = "是否上线id", IsNullable = true, DefaultValue = "0")] + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; + /// /// Desc:是否上线(是否管理中) /// - [SugarColumn(ColumnDescription = "是否上线", IsNullable = true, DefaultValue = "0")] - public Int16? IsOnline { get; set; } = 0; + [SugarColumn(ColumnDescription = "是否上线", IsNullable = true, Length = 20)] + public string IsOnline { get; set; } + /// /// Desc:空重箱 @@ -116,7 +146,7 @@ public class CM_CurrentState : BaseOrgModel /// /// 委托单位Id /// - [SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = false, DefaultValue = "0")] + [SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = true, DefaultValue = "0")] public long CustomerId { get; set; } /// /// 业务委托单位 t_info_client CUSTNAME diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CustFeeDui.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CustFeeDui.cs new file mode 100644 index 00000000..e0f956bb --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CustFeeDui.cs @@ -0,0 +1,50 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Entity; + +/// +/// 箱管_月结账单 +/// +[SqlSugar.SugarTable("CM_ustFeeDui", "箱管_月结账单")] +public class CM_ustFeeDui : BaseOrgModel +{ + /// + /// Desc:月结账单编号 + /// + [SugarColumn(ColumnDescription = "月结账单编号", IsNullable = false, Length = 20)] + public string Billno { get; set; } + + /// + /// 结算对象Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "结算对象Id", IsNullable = false, DefaultValue = "0")] + public long CustomerId { get; set; } + /// + /// 结算对象 t_info_client CUSTNAME + /// + [SqlSugar.SugarColumn(ColumnDescription = "结算对象", IsNullable = true, Length = 50)] + public string CustomerName { get; set; } + + /// + /// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum + /// + [SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")] + public string RentType { get; set; } + + /// + /// Desc:业务状态 + /// + [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] + public string BillState { get; set; } + + + + /// + /// Desc:备注 + /// + [SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)] + public string Remark { get; set; } +} + diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn.cs index bb1f9421..a0ac93f6 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn.cs @@ -17,9 +17,9 @@ public class CM_RentIn : BaseOrgModel public string Billno { get; set; } /// - /// Desc:租箱退租 + /// Desc:租箱业务 /// - [SugarColumn(ColumnDescription = "租箱退租", IsNullable = false, Length = 20)] + [SugarColumn(ColumnDescription = "租箱业务", IsNullable = false, Length = 20)] public string RentDirect { get; set; } /// @@ -34,7 +34,11 @@ public class CM_RentIn : BaseOrgModel [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] public string BillState { get; set; } - + /// + /// Desc:原箱主Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = true, DefaultValue = "0")] + public long? OldContainerOwnerId { get; set; } /// /// Desc:原箱主 /// @@ -45,7 +49,7 @@ public class CM_RentIn : BaseOrgModel /// /// Desc:业务日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] public DateTime? Bsdate { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn_Detail.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn_Detail.cs index ac048ee2..071f3486 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn_Detail.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentIn_Detail.cs @@ -13,7 +13,7 @@ public class CM_RentIn_Detail : BaseOrgModel /// /// 租箱业务id /// - [SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false)] + [SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)] public long Pid { get; set; } /// @@ -27,14 +27,22 @@ public class CM_RentIn_Detail : BaseOrgModel /// [SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)] public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } /// /// Desc:箱型 /// [SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)] public string Ctnall { get; set; } - + /// + /// Desc:原箱主Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = true, DefaultValue = "0")] + public long? OldContainerOwnerId { get; set; } /// /// Desc:原箱主 /// @@ -72,14 +80,14 @@ public class CM_RentIn_Detail : BaseOrgModel /// /// Desc:租入日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] public DateTime? Bsdate { get; set; } /// /// Desc:开始计费日期 /// - [SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true, Length = 7)] - public string FeeStartDate { get; set; } + [SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)] + public DateTime? FeeStartDate { get; set; } /// /// Desc:币别 @@ -105,7 +113,7 @@ public class CM_RentIn_Detail : BaseOrgModel /// /// Desc:提箱日期 /// - [SugarColumn(ColumnDescription = "提箱日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)] public DateTime? PickupDate { get; set; } /// @@ -118,23 +126,31 @@ public class CM_RentIn_Detail : BaseOrgModel /// /// Desc:还箱日期 /// - [SugarColumn(ColumnDescription = "还箱日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)] public DateTime? DropoffDate { get; set; } - /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// - [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)] public string PickupPortid { get; set; } - + /// + /// Desc:提箱港口 + /// + [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)] + public string PickupPort { get; set; } /// - /// Desc:还箱港口 + /// Desc:还箱港口代码 /// - [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)] public string DropoffPortid { get; set; } + /// + /// Desc:还箱港口 + /// + [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)] + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay.cs new file mode 100644 index 00000000..508d40b0 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay.cs @@ -0,0 +1,130 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Entity; + +/// +/// 箱管_单程业务 +/// +[SqlSugar.SugarTable("CM_RentOneWay", "箱管_单程业务")] +public class CM_RentOneWay : BaseOrgModel +{ + /// + /// Desc:租箱业务号 + /// + [SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)] + public string Billno { get; set; } + + /// + /// Desc:租箱业务 租入 租入退租 租出 CMRentDirectEnum + /// + [SugarColumn(ColumnDescription = "租箱业务", IsNullable = false, Length = 20)] + public string RentDirect { get; set; } + + /// + /// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum + /// + [SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")] + public string RentType { get; set; } + + /// + /// Desc:业务状态 + /// + [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] + public string BillState { get; set; } + + /// + /// Desc:原箱主Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")] + public long OldContainerOwnerId { get; set; } + /// + /// Desc:原箱主 + /// + [SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)] + public string OldContainerOwner { get; set; } + + /// + /// Desc:租箱客户Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")] + public long RentCustomerId { get; set; } + /// + /// Desc:租箱客户 + /// + [SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)] + public string RentCustomerName { get; set; } + + /// + /// Desc:业务日期 + /// + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] + public DateTime? Bsdate { get; set; } + + /// + /// Desc:会计期间 + /// + [SugarColumn(ColumnDescription = "会计期间", IsNullable = true, Length = 7)] + public string Accdate { get; set; } + + /// + /// Desc:是否业务锁定 + /// + [SugarColumn(ColumnDescription = "是否业务锁定", IsNullable = false, DefaultValue = "0")] + public bool? IsBusinessLocking { get; set; } = false; + /// + /// Desc:是否费用锁定 + /// + [SugarColumn(ColumnDescription = "是否费用锁定", IsNullable = false, DefaultValue = "0")] + public bool? IsFeeLocking { get; set; } = false; + + /// + /// Desc:提箱港口代码 + /// + [SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)] + public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)] + public string PickupPort { get; set; } + + + /// + /// Desc:还箱港口代码 + /// + [SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)] + public string DropoffPortid { get; set; } + /// + /// Desc:还箱港口 + /// + [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)] + public string DropoffPort { get; set; } + + /// + /// Desc:ETD + /// + [SugarColumn(ColumnDescription = "ETD", IsNullable = true)] + public DateTime? ETD { get; set; } + + /// + /// Desc:ETD + /// + [SugarColumn(ColumnDescription = "ETA", IsNullable = true)] + public DateTime? ETA { get; set; } + + + /// + /// Desc:当前业务编号 + /// + [SugarColumn(ColumnDescription = "当前业务编号", IsNullable = true, Length = 50)] + public string Mblno { get; set; } + + /// + /// Desc:备注 + /// + [SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)] + public string Remark { get; set; } +} + diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay_Detail.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay_Detail.cs new file mode 100644 index 00000000..038f9002 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOneWay_Detail.cs @@ -0,0 +1,175 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Entity; + +/// +/// 箱管_租箱租入明细 +/// +[SqlSugar.SugarTable("CM_RentOneWay_Detail", "箱管_租箱租入明细")] +public class CM_RentOneWay_Detail : BaseOrgModel +{ + /// + /// 租箱业务id + /// + [SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)] + public long Pid { get; set; } + + /// + /// Desc:租箱业务号 + /// + [SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)] + public string Billno { get; set; } + + /// + /// Desc:箱号 + /// + [SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)] + public string Cntrno { get; set; } + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } + /// + /// Desc:箱型 + /// + [SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)] + public string Ctnall { get; set; } + + /// + /// Desc:原箱主Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")] + public long OldContainerOwnerId { get; set; } + /// + /// Desc:原箱主 + /// + [SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)] + public string OldContainerOwner { get; set; } + + /// + /// Desc:租箱客户Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")] + public long RentCustomerId { get; set; } + /// + /// Desc:租箱客户 + /// + [SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)] + public string RentCustomerName { get; set; } + + + /// + /// Desc:租箱业务 租入0/租入退租1 + /// + [SugarColumn(ColumnDescription = "租箱业务", IsNullable = true, Length = 20)] + public string CMRentDirectEnum { get; set; } + + /// + /// Desc:租箱类型 长租1 短租0 单程2 + /// + [SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20)] + public string RentType { get; set; } + + /// + /// Desc:业务状态 + /// + [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] + public string BillState { get; set; } + + + /// + /// Desc:关联放箱单号 + /// + [SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)] + public string CtnReleaseNo { get; set; } + + + /// + /// Desc:租入日期 + /// + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] + public DateTime? Bsdate { get; set; } + + /// + /// Desc:开始计费日期 + /// + [SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)] + public DateTime? FeeStartDate { get; set; } + + /// + /// Desc:币别 + /// + [SugarColumn(ColumnDescription = "币别", IsNullable = true, Length = 7)] + public string Currenty { get; set; } = "USD"; + + + /// + /// Desc:日租金 + /// + [SugarColumn(ColumnDescription = "日租金", IsNullable = true, Length = 20)] + public decimal? Dailyrate { get; set; } = 0M; + + + /// + /// Desc:提箱费 + /// + [SugarColumn(ColumnDescription = "提箱费", IsNullable = true, Length = 20)] + public decimal? PickupFee { get; set; } = 0M; + + + /// + /// Desc:提箱日期 + /// + [SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)] + public DateTime? PickupDate { get; set; } + + /// + /// Desc:还箱费 + /// + [SugarColumn(ColumnDescription = "还箱费", IsNullable = true, Length = 20)] + public decimal? DropoffFee { get; set; } = 0M; + + + /// + /// Desc:还箱日期 + /// + [SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)] + public DateTime? DropoffDate { get; set; } + + + [SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)] + public string PickupPortid { get; set; } + /// + /// Desc:提箱港口 + /// + [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)] + public string PickupPort { get; set; } + + + /// + /// Desc:还箱港口代码 + /// + [SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)] + public string DropoffPortid { get; set; } + /// + /// Desc:还箱港口 + /// + [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)] + public string DropoffPort { get; set; } + + /// + /// Desc:业务编号/提单号 + /// + [SugarColumn(ColumnDescription = "业务编号/提单号", IsNullable = true, Length = 20)] + public string Mblno { get; set; } + + /// + /// Desc:运输工具 + /// + [SugarColumn(ColumnDescription = "运输工具", IsNullable = true, Length = 100)] + public string VehicleName { get; set; } +} + diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut.cs index c2b34755..0aa6e183 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut.cs @@ -33,17 +33,21 @@ public class CM_RentOut : BaseOrgModel /// [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] public string BillState { get; set; } - + /// + /// Desc:租箱客户Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")] + public long RentCustomerId { get; set; } /// /// Desc:租箱客户 /// [SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)] - public string RentCustomername { get; set; } + public string RentCustomerName { get; set; } /// /// Desc:业务日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] public DateTime? Bsdate { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut_Detail.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut_Detail.cs index 7e249c6f..736538f3 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut_Detail.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_RentOut_Detail.cs @@ -13,7 +13,7 @@ public class CM_RentOut_Detail : BaseOrgModel /// /// 租箱业务id /// - [SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false)] + [SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)] public long Pid { get; set; } /// @@ -27,19 +27,27 @@ public class CM_RentOut_Detail : BaseOrgModel /// [SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)] public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } /// /// Desc:箱型 /// [SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)] public string Ctnall { get; set; } - + /// + /// Desc:租箱客户Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")] + public long RentCustomerId { get; set; } /// /// Desc:租箱客户 /// [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 /// - /// Desc:租入日期 + /// Desc:租出日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "租出业务日期", IsNullable = true)] public DateTime? Bsdate { get; set; } /// /// Desc:开始计费日期 /// - [SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true, Length = 7)] - public string FeeStartDate { get; set; } + [SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)] + public DateTime? FeeStartDate { get; set; } /// /// Desc:币别 @@ -104,7 +112,7 @@ public class CM_RentOut_Detail : BaseOrgModel /// /// Desc:提箱日期 /// - [SugarColumn(ColumnDescription = "提箱日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)] public DateTime? PickupDate { get; set; } /// /// Desc:还箱费 @@ -116,23 +124,32 @@ public class CM_RentOut_Detail : BaseOrgModel /// /// Desc:还箱日期 /// - [SugarColumn(ColumnDescription = "还箱日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)] public DateTime? DropoffDate { get; set; } /// - /// Desc:提箱港口 + /// Desc:提箱港口代码 /// - [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)] public string PickupPortid { get; set; } - + /// + /// Desc:提箱港口 + /// + [SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)] + public string PickupPort { get; set; } /// - /// Desc:还箱港口 + /// Desc:还箱港口代码 /// - [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)] public string DropoffPortid { get; set; } + /// + /// Desc:还箱港口 + /// + [SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)] + public string DropoffPort { get; set; } /// /// Desc:业务编号/提单号 diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_Rent_OneWay.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_Rent_OneWay.cs index 11d1e8a3..65ed60c0 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_Rent_OneWay.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_Rent_OneWay.cs @@ -33,17 +33,21 @@ public class CM_Rent_OneWay : BaseOrgModel /// [SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)] public string BillState { get; set; } - + /// + /// Desc:租箱客户Id + /// + [SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")] + public long RentCustomerId { get; set; } /// /// Desc:租箱客户 /// [SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)] - public string RentCustomername { get; set; } + public string RentCustomerName { get; set; } /// /// Desc:业务日期 /// - [SugarColumn(ColumnDescription = "业务日期", IsNullable = true, Length = 20)] + [SugarColumn(ColumnDescription = "业务日期", IsNullable = true)] public DateTime? Bsdate { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_State_Change.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_State_Change.cs index 4dd43f37..15a5d870 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_State_Change.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_State_Change.cs @@ -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 /// [SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)] public string Cntrno { get; set; } - + /// + /// 箱型代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)] + public string CtnCode { get; set; } /// /// Desc:箱型 /// [SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)] public string Ctnall { get; set; } + /// + /// Desc:变动来源Id 用于表示此变动来自哪个业务模块 + /// + [SugarColumn(ColumnDescription = "变动来源Id", IsNullable = true)] + public CMChangeSourceEnum ChangeSourceId { get; set; } /// /// Desc:变动来源 用于表示此变动来自哪个业务模块 /// - [SugarColumn(ColumnDescription = "变动来源", IsNullable = false, Length = 50)] + [SugarColumn(ColumnDescription = "变动来源", IsNullable = true, Length = 50)] public string ChangeSource { get; set; } + /// + /// Desc:是否上线id(是否管理中) + /// + [SugarColumn(ColumnDescription = "是否上线id", IsNullable = true, DefaultValue = "0")] + public CM_IsOnlineEnum? IsOnlineId { get; set; } = 0; + /// /// Desc:是否上线(是否管理中) /// - [SugarColumn(ColumnDescription = "是否上线", IsNullable = false,DefaultValue ="0")] - public Int16? IsOnline { get; set; } = 0; + [SugarColumn(ColumnDescription = "是否上线", IsNullable = true, Length = 20)] + public string IsOnline { get; set; } /// /// Desc:新旧箱 空白/used/new @@ -43,7 +59,7 @@ public class CM_State_Change : BaseOrgModel /// /// 箱主Id /// - [SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = false, DefaultValue = "0")] + [SqlSugar.SugarColumn(ColumnDescription = "箱主Id", IsNullable = true, DefaultValue = "0")] public long CtnOwnerId { get; set; } /// /// Desc:箱主 @@ -52,10 +68,10 @@ public class CM_State_Change : BaseOrgModel public string CtnOwner { get; set; } /// - /// Desc:业务所属分部 + /// Desc:箱来源Id: 自有箱/短租租入/长租租入/买箱 /// - [SugarColumn(ColumnDescription = "业务所属分部", IsNullable = true, Length = 50)] - public string Corpid { get; set; } + [SugarColumn(ColumnDescription = "箱来源Id", IsNullable = true, Length = 20)] + public CM_CtnSourceEnum? CtnSourceId { get; set; } /// /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 @@ -66,7 +82,7 @@ public class CM_State_Change : BaseOrgModel /// /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 /// - [SugarColumn(ColumnDescription = "箱业务状态", DefaultValue = "")] + [SugarColumn(ColumnDescription = "箱业务状态", IsNullable = true, DefaultValue = "")] public string CtnBizState { get; set; } = "0"; /// @@ -78,9 +94,14 @@ public class CM_State_Change : BaseOrgModel /// /// Desc:关联放箱单号 /// - [SugarColumn(ColumnDescription = "关联放箱单号", Length = 50)] + [SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)] public string CtnReleaseNo { get; set; } + /// + /// Desc:箱状态Id + /// + [SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true, Length = 20)] + public CMCtnStateEnum? CtnStateId { get; set; } /// /// Desc:箱状态 /// @@ -96,7 +117,7 @@ public class CM_State_Change : BaseOrgModel /// /// Desc:空重箱 /// - [SugarColumn(ColumnDescription = "空重箱", IsNullable = false, DefaultValue = "0")] + [SugarColumn(ColumnDescription = "空重箱", IsNullable = true, DefaultValue = "0")] public bool? IsHeavy { get; set; } = false; /// @@ -127,7 +148,7 @@ public class CM_State_Change : BaseOrgModel /// /// 委托单位Id /// - [SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = false, DefaultValue = "0")] + [SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = true, DefaultValue = "0")] public long CustomerId { get; set; } /// /// 业务委托单位 t_info_client CUSTNAME diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_State_ChangeService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_State_ChangeService.cs index 7d520672..88711c39 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_State_ChangeService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_State_ChangeService.cs @@ -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(); _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; diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs index 78d3a699..f6680e41 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs @@ -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); diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs index c1d3d068..f9194d9d 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs @@ -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().Where(x => x.Id == userId).Select(x => new { x.Id, x.UserName }).First(); diff --git a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClient.cs b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClient.cs index dcecc2b2..3ccb33f1 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClient.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClient.cs @@ -497,7 +497,7 @@ public class InfoClient : BaseModelV2 /// /// 开票方式 /// - [SugarColumn(ColumnDescription = "开票方式")] + [SugarColumn(ColumnDescription = "开票方式", IsNullable = true)] public InvoicingMethod? InvoicingMethod { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportSaveLog.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportSaveLog.cs new file mode 100644 index 00000000..aa69126b --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportSaveLog.cs @@ -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 +{ + /// + /// + /// + public class SeaExportSaveLog + { + /// + /// 操作方式:新增(Create)、更新(Update)、删除(Delete) + /// + public string OperateType { get; set; } = "Update"; + /// + /// 旧值 + /// + public SeaExport OldOrder { get; set; } + /// + /// 新值 + /// + + public SeaExport NewOrder { get; set; } + + + /// + /// 业务来源代码 + /// + + public string SourceCode { get; set; } + /// + /// 业务来源 + /// + + public string SourceName { get; set; } + + /// + /// + /// + public List UpdateFields { get; set; } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/BusinessTaskDto.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/BusinessTaskDto.cs index b8ff055b..45672f37 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/BusinessTaskDto.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/BusinessTaskDto.cs @@ -55,5 +55,10 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction /// 创建时间 /// public DateTime CreateTime { get; set; } + + /// + /// 驳回审批理由 + /// + public string? RejectReason { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskCreationRequest.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskCreationRequest.cs index 9224e41d..407bec4f 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskCreationRequest.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskCreationRequest.cs @@ -19,5 +19,10 @@ /// 任务接收用户ID;此值为空时则从配置中获取 /// public long[]? RecvUserIdList { get; set; } + + /// + /// 驳回审批理由 + /// + public string? RejectReason { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskUpdateRequest.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskUpdateRequest.cs index 745e2bab..b0c1ce4c 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskUpdateRequest.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/TaskInteraction/TaskUpdateRequest.cs @@ -16,5 +16,10 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction /// 当任务完成时,是否根据任务类型自动创建下一任务;默认为true /// public bool AutoCreateNext { get; set; } = true; + + /// + /// 驳回审批理由 + /// + public string? RejectReason { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTask.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTask.cs index 4f30218b..dcb5c96e 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTask.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTask.cs @@ -76,5 +76,11 @@ namespace DS.WMS.Core.Op.Entity.TaskInteraction /// [SugarColumn(ColumnDescription = "创建时间", IsNullable = false)] public DateTime CreateTime { get; set; } + + /// + /// 审批驳回理由 + /// + [SugarColumn(ColumnDescription = "审批驳回理由", Length = 200, IsNullable = true)] + public string? RejectReason { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTaskLog.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTaskLog.cs new file mode 100644 index 00000000..bf66f593 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/TaskInteraction/BusinessTaskLog.cs @@ -0,0 +1,104 @@ +using System.ComponentModel; +using System.Runtime.Serialization; +using DS.Module.Core; +using SqlSugar; + +namespace DS.WMS.Core.Op.Entity.TaskInteraction +{ + /// + /// 业务任务日志表 + /// + [SugarTable("business_task_log", "业务任务日志表")] + public class BusinessTaskLog + { + /// + /// ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true), IgnoreDataMember] + public long Id { get; set; } + + /// + /// 动作类型 + /// + [SugarColumn(ColumnDescription = "动作类型", IsNullable = false)] + public ActionType? ActionType { get; set; } + + /// + /// 业务ID + /// + [SugarColumn(ColumnDescription = "业务ID", IsNullable = false)] + public long BusinessId { get; set; } + + /// + /// 业务类型 + /// + [SugarColumn(ColumnDescription = "业务类型", IsNullable = false)] + public BusinessType BusinessType { get; set; } + + /// + /// 任务类型 + /// + [SugarColumn(ColumnDescription = "任务类型", IsNullable = false)] + public TaskBaseTypeEnum TaskType { get; set; } + + /// + /// 任务状态 + /// + [SugarColumn(ColumnDescription = "任务状态", IsNullable = true)] + public TaskStatusEnum? TaskStatus { get; set; } + + /// + /// 审核状态 + /// + [SugarColumn(ColumnDescription = "审核状态", IsNullable = true)] + public FlowStatusEnum? AuditStatus { get; set; } + + /// + /// 接收人 + /// + [SugarColumn(ColumnDescription = "接收人", IsNullable = true)] + public string? RecvUsers { get; set; } + + /// + /// 获取接收人列表 + /// + [SugarColumn(IsIgnore = true)] + public string[] RecvUserIdArray => RecvUsers == null ? [] : RecvUsers.Split(',', StringSplitOptions.RemoveEmptyEntries); + + /// + /// 备注 + /// + [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = "text")] + public string? Remark { get; set; } + + /// + /// 创建人 + /// + [SugarColumn(ColumnDescription = "创建人", IsNullable = false)] + public long CreateBy { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnDescription = "创建时间", IsNullable = false)] + public DateTime CreateTime { get; set; } + } + + /// + /// 动作类型 + /// + public enum ActionType + { + /// + /// 新增 + /// + [Description("新增")] + Create = 1, + + /// + /// 状态变更 + /// + [Description("状态变更")] + StatusChanged = 2 + } +} diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportCommonService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportCommonService.cs index 5d81a1ec..9d119902 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportCommonService.cs @@ -14,6 +14,12 @@ namespace DS.WMS.Core.Op.Interface { public interface ISeaExportCommonService { + /// + /// 海运出口差异日志 + /// + /// + /// + public Task SaveSeaExportLog(SeaExportSaveLog req); /// /// 获取第三方账户 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskLogService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskLogService.cs new file mode 100644 index 00000000..a3201914 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskLogService.cs @@ -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 +{ + /// + /// 海运出口交互任务 + /// + public interface ITaskLogService + { + /// + /// 读取业务日志 + /// + /// 业务ID + /// 业务类型 + /// + Task>> ReadLogAsync(long id, BusinessType businessType); + + /// + /// 写入任务日志 + /// + /// + /// 备注 + /// + Task WriteLogAsync(TaskUpdateRequest request, string? remark = null); + + /// + /// 写入任务日志 + /// + /// + /// 备注 + /// + Task WriteLogAsync(BusinessTask task, string? remark = null); + + /// + /// 写入任务日志 + /// + /// + /// + Task WriteLogAsync(params BusinessTaskLog[] logs); + } +} diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs index c3a57990..d8a6d610 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs @@ -16,8 +16,9 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction /// /// 业务ID /// 业务类型 + /// 任务类型 /// - Task>> GetTasks(long id, BusinessType businessType); + Task>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types); /// /// 创建关联任务 diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs index 2c43c907..53355381 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs @@ -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(); } + /// + /// 忽略的字段 + /// + private static readonly List IgnoreColumns = new List() + { + "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 获取客户结算方式及结算日期 diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index c116a287..8b21bef9 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -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); diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs index dc5cbffc..c5b1a325 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs @@ -44,6 +44,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction string tenatName = Db.Queryable().Where(x => x.Id == tenatId).Select(x => x.Name).First(); var dt = DateTime.Now; var taskList = new List(); + var taskLogList = new List(); 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(); } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskLogService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskLogService.cs new file mode 100644 index 00000000..a653204c --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskLogService.cs @@ -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 +{ + /// + /// 任务日志服务 + /// + public class TaskLogService : ServiceBase, ITaskLogService + { + /// + /// 初始化 + /// + /// + public TaskLogService(IServiceProvider provider) : base(provider) + { + } + + /// + /// 读取业务日志 + /// + /// 业务ID + /// 业务类型 + /// + public async Task>> ReadLogAsync(long id, BusinessType businessType) + { + var list = await TenantDb.Queryable().Where(x => x.BusinessId == id && x.BusinessType == businessType) + .OrderBy(x => x.CreateTime).ToListAsync(); + var result = DataResult>.Success(list); + result.Count = list.Count; + return result; + } + + /// + /// 写入任务日志 + /// + /// + /// 备注 + /// + public async Task WriteLogAsync(TaskUpdateRequest request, string? remark = null) + { + long userId = long.Parse(User.UserId); + string userName = await Db.Queryable().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); + } + + /// + /// 写入任务日志 + /// + /// + /// 备注 + /// + public async Task WriteLogAsync(BusinessTask task, string? remark = null) + { + string userNames = string.Empty; + if (task.RecvUserIdArray?.Length > 0) + { + var list = await Db.Queryable().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); + } + + /// + /// 写入任务日志 + /// + /// 任务日志 + /// 为null + /// + public async Task WriteLogAsync(params BusinessTaskLog[] logs) + { + ArgumentNullException.ThrowIfNull(logs, nameof(logs)); + + await TenantDb.Insertable(logs).ExecuteCommandAsync(); + } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index b4468503..6e231881 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -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 /// protected ITaskManageService ManagerService { get; private set; } + /// + /// 日志服务 + /// + protected ITaskLogService LogService { get; private set; } + /// /// 工作流服务 /// @@ -45,6 +49,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction public TaskService(IServiceProvider provider) : base(provider) { ManagerService = provider.GetRequiredService(); + LogService = provider.GetRequiredService(); FlowService = new Lazy(provider.GetRequiredService()); } @@ -70,11 +75,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction /// /// 业务ID /// 业务类型 + /// 任务类型 /// - public async Task>> GetTasks(long id, BusinessType businessType) + public async Task>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types) { - var list = await TenantDb.Queryable().Where( - x => x.BusinessId == id && x.BusinessType == businessType).Select().ToListAsync(); + var list = await TenantDb.Queryable().Where(x => x.BusinessId == id && x.BusinessType == businessType) + .WhereIF(types != null && types.Length > 0, x => types.Contains(x.TaskType)) + .Select().ToListAsync(); var result = DataResult>.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 + }); } /// @@ -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 + }); } /// diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/SysFieldSetDtos.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/SysFieldSetDtos.cs new file mode 100644 index 00000000..c82f746a --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/SysFieldSetDtos.cs @@ -0,0 +1,21 @@ +using DS.WMS.Core.Sys.Entity; + +namespace DS.WMS.Core.Sys.Dtos +{ + /// + /// 任务台字段自定义列查询接口的返回Dto + /// + public class SysFieldSetTaskPlatQueryDtos: SysFieldSet + { + /// + /// 任务类型Code + /// + public string TaskTypeCode { get; set; } + + + /// + /// 是否为默认配置 + /// + public bool IsDefault { get; set; } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserFieldSetUpdateReq.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserFieldSetUpdateReq.cs index 376ea24f..076324eb 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserFieldSetUpdateReq.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserFieldSetUpdateReq.cs @@ -20,4 +20,13 @@ public class UserFieldSetUpdateReq /// 字段设置 /// public string Content { get; set; } + /// + /// 任务类型Code + /// + public string TaskTypeCode { get; set; } + + /// + /// 是否用于设置默认字段 + /// + public bool IsSetDefault { get; set; } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Interface/ICommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Interface/ICommonService.cs index ba51686e..d1038abc 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Interface/ICommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Interface/ICommonService.cs @@ -30,14 +30,14 @@ public interface ICommonService /// DataResult> GetUserPermissionByToken(); - + /// /// 后台端刷新Token /// /// DataResult UserRefreshToken(); - - + + /// /// 客户端刷新Token /// @@ -95,7 +95,7 @@ public interface ICommonService /// /// public DataResult> GetUserList(); - + /// /// 获取机构下拉列表 /// @@ -123,7 +123,7 @@ public interface ICommonService /// public DataResult ChangePassword(ChangePasswordReq model); - + /// /// 租户注册 /// @@ -156,7 +156,7 @@ public interface ICommonService /// public DataResult> GetClientPermissionTreeList(); - + /// /// 获取表及视图 /// @@ -187,7 +187,7 @@ public interface ICommonService /// /// 标识序号 /// - public DataResult GetUserFieldSet(string permissionId, int tagNo = 0); + public DataResult GetUserFieldSet(string permissionId, int tagNo = 0); /// @@ -202,8 +202,8 @@ public interface ICommonService /// /// public DataResult GetSequenceNext(); - - + + /// /// 获取字典明细 /// @@ -261,16 +261,29 @@ public interface ICommonService /// /// public DataResult> GetClientStlModeSelectList(); - + /// /// 获取业务来源下拉列表-客户端 /// /// public DataResult> GetClientSourceSelectList(); - + /// /// 获取业务来源明细下拉列表-客户端 /// /// public DataResult> GetClientSourceDetailSelectList(string id); + + /// + /// 更新任务台用户字段设置 + /// + Task UpdateUserTaskPlatFieldSet(UserFieldSetUpdateReq req); + + /// + /// 批量获取任务台用户字段设置 + /// + /// + /// 是否获取默认配置 false:仅获取默认配置 true:如果存在个人配置优先获取个人配置,否则获取默认配置 + /// 任务类型Code + Task>> GetUserTaskPlatFieldSet(string permissionId, bool isGetDefault, string[] taskTypeCodeArray); } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs index dbb11fd7..1d54fbbc 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs @@ -371,7 +371,7 @@ public class ClientCommonService : IClientCommonService var carrier = await tenantDb.Queryable() .InnerJoin((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, diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs index 63a959d6..0a09fcb0 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs @@ -39,6 +39,11 @@ public class CommonService : ICommonService private readonly IWebHostEnvironment _environment; private readonly ILogger _logger; + /// + /// 任务台基础表自定义列对应的Code + /// + private const string TASK_PLAT_BASIC_CODE = "BASIC"; + /// /// /// @@ -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().Filter(null, true).Where(x => x.Id == userId) .Select(a => new CurrentUserViewModel @@ -326,12 +331,12 @@ public class CommonService : ICommonService { return DataResult.Failed("Token解密失败!"); } - + var userId = long.Parse(result["jti"]); var userInfo = db.Queryable().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.Success(data); @@ -621,7 +626,7 @@ public class CommonService : ICommonService foreach (var item in list) { - var childs =await db.Queryable().Filter(null, true) + var childs = await db.Queryable().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 /// 获取客户端按钮权限 /// /// - public async Task> GetClientUserPermissionCode() { - - var userId = long.Parse(user.UserId); + public async Task> GetClientUserPermissionCode() + { + + var userId = long.Parse(user.UserId); var roleList = await db.Queryable() - .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().Where(a => roleList.Contains(a.RoleId) && a.IsPermission == 1) - .InnerJoin((a,b)=>a.PermissionId == b.Id) + var list = await db.Queryable().Where(a => roleList.Contains(a.RoleId) && a.IsPermission == 1) + .InnerJoin((a, b) => a.PermissionId == b.Id) .Where((a, b) => b.MenuType == 3) .Select((a, b) => b.PermissionCode ).ToArrayAsync(); - + return await Task.FromResult(DataResult.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().Where(x => x.MenuType == 2 && x.ParentId == child.Key) @@ -941,7 +947,7 @@ public class CommonService : ICommonService /// public DataResult> GetOrgList() { - var list = db.Queryable().Where(a=>a.Status == StatusEnum.Enable && a.IsDepartment == false) + var list = db.Queryable().Where(a => a.Status == StatusEnum.Enable && a.IsDepartment == false) .Select(a => new ApiSelectViewModel { Label = a.OrgName, @@ -1312,7 +1318,7 @@ public class CommonService : ICommonService /// /// public List GetOperationRuleConditional() - { + { var userInfo = db.Queryable().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.Success(info); } + + /// + /// 批量获取任务台用户字段设置 + /// + /// + /// 是否获取默认配置 false:仅获取默认配置 true:如果存在个人配置优先获取个人配置,否则获取默认配置 + /// 任务类型Code + /// + public async Task>> GetUserTaskPlatFieldSet(string permissionId, bool isGetDefault, string[] taskTypeCodeArray) + { + if (taskTypeCodeArray == null || taskTypeCodeArray.Length == 0) + { + return DataResult>.Success(null); + } + + long userId = long.Parse(user.UserId); + Dictionary 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() + .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(); + 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>.Success(result); + } + /// /// 更新用户字段设置 /// @@ -1447,6 +1527,50 @@ public class CommonService : ICommonService return DataResult.Successed("更新成功"); } + /// + /// 更新任务台用户字段设置 + /// + public async Task 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() + .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().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().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>.Failed("请传入正确的字典代码!"); } @@ -1583,23 +1707,23 @@ public class CommonService : ICommonService foreach (var item in types) { - var dictValues = new List(); + var dictValues = new List(); if (language == "CN") { - dictValues = db.Queryable().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable) - .Select().ToList(); + dictValues = db.Queryable().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable) + .Select().ToList(); } else if (language == "EN") - { + { dictValues = db.Queryable().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().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().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable) .Select(x => new DropDownData { diff --git a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index fe37d9ee..4e643d5f 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\Publish\DS8\FeeApi - 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||; + 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||; \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs index 92954f50..caf21d0b 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs @@ -26,7 +26,7 @@ public class CommonController : ApiController _invokeService = invokeService; } - + /// /// 登出 /// @@ -37,7 +37,7 @@ public class CommonController : ApiController { return DataResult.Success(""); } - + /// /// 用户登录-客户端 /// @@ -96,7 +96,7 @@ public class CommonController : ApiController /// [HttpGet] [Route("ChangeOrg")] - public DataResult ChangeOrg([FromQuery]string id) + public DataResult 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; } - + /// /// 查询用户拥有的菜单权限-客户端 /// @@ -157,7 +157,7 @@ public class CommonController : ApiController var res = _invokeService.GetUserList(); return res; } - + /// /// 获取机构下拉选项 /// @@ -169,7 +169,7 @@ public class CommonController : ApiController var res = _invokeService.GetOrgList(); return res; } - + /// /// 获取商品类型下拉选项 /// @@ -315,7 +315,7 @@ public class CommonController : ApiController return res; } - + /// /// 企业用户注册 /// @@ -330,7 +330,7 @@ public class CommonController : ApiController return res; } - + /// /// 获取权限树列表-客户端 /// @@ -355,7 +355,7 @@ public class CommonController : ApiController var res = _invokeService.GetDataRuleEntityFields(permissionId); return res; } - + /// /// 获取客户数据权限列表 /// @@ -378,7 +378,7 @@ public class CommonController : ApiController var res = _invokeService.GetTables(); return res; } - + /// /// 获取数据库表及视图名 /// @@ -427,8 +427,21 @@ public class CommonController : ApiController var res = _invokeService.GetUserFieldSet(permissionId, tagNo); return res; } + /// + /// 批量获取任务台用户字段设置 + /// + /// + /// 是否获取默认配置 false:仅获取默认配置 true:如果存在个人配置优先获取个人配置,否则获取默认配置 + /// 任务类型Code + [HttpGet] + [Route("GetUserTaskPlatFieldSet")] + public async Task>> GetUserTaskPlatFieldSet([FromQuery] string permissionId, [FromQuery] bool isGetDefault, [FromQuery] string[] taskTypeCodeArray) + { + var res = await _invokeService.GetUserTaskPlatFieldSet(permissionId, isGetDefault, taskTypeCodeArray); + return res; + } + - /// /// 更新用户字段设置 /// @@ -441,16 +454,26 @@ public class CommonController : ApiController var res = _invokeService.UpdateUserFieldSet(req); return res; } - + /// + /// 更新任务台用户字段设置 + /// + [HttpPost] + [Route("UpdateUserTaskPlatFieldSet")] + public async Task UpdateUserTaskPlatFieldSet([FromBody] UserFieldSetUpdateReq req) + { + var res = await _invokeService.UpdateUserTaskPlatFieldSet(req); + return res; + } + /// /// 获取字典下拉明细 /// /// /// [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 /// /// [HttpPost] - [Route("GetDictOptions")] + [Route("GetDictOptions")] public DataResult> GetDictOptions([FromBody] DropDownDictTypeInput model) - { + { var res = _invokeService.GetDictOptions(model); return res; } diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user index 73975b0c..f2a959bf 100644 --- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user +++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user @@ -1,6 +1,6 @@  - D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs index 519ffd8e..064898f7 100644 --- a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs +++ b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs @@ -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 /// /// 业务ID /// 业务类型 + /// 任务类型名称(可选) /// [HttpGet, Route("GetList")] - public async Task>> GetListAsync([FromQuery]long businessId, [FromQuery] BusinessType businessType) + public async Task>> GetListAsync( + [FromQuery] long businessId, + [FromQuery] BusinessType businessType, + [FromQuery] params string[] taskTypes) { - return await taskService.GetTasks(businessId, businessType); + var types = taskTypes.Select(Enum.Parse).ToArray(); + return await taskService.GetTasks(businessId, businessType, types); + } + + /// + /// 获取指定业务的任务日志 + /// + /// + /// 业务ID + /// 业务类型 + /// + [HttpGet, Route("GetLogs")] + public async Task>> GetLogsAsync([FromServices] ITaskLogService logService, [FromQuery] long businessId, [FromQuery] BusinessType businessType) + { + return await logService.ReadLogAsync(businessId, businessType); } /// @@ -71,7 +91,7 @@ namespace DS.WMS.OpApi.Controllers /// /// [HttpPost, Route("SubmitAudit")] - public async Task SubmitAuditAsync(TaskRequest request) + public async Task SubmitAuditAsync(TaskRequest request) { return await taskService.SubmitAuditAsync(request); } diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user index 99e0fcb6..21e5222f 100644 --- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user @@ -1,7 +1,7 @@  - D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller diff --git a/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs b/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs index 7c37c915..e6077dbe 100644 --- a/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs +++ b/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs @@ -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)); diff --git a/ds-wms-service/DS.WMS.Test/SaasDBUpdateTest.cs b/ds-wms-service/DS.WMS.Test/SaasDBUpdateTest.cs new file mode 100644 index 00000000..ea63fdd0 --- /dev/null +++ b/ds-wms-service/DS.WMS.Test/SaasDBUpdateTest.cs @@ -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(); + saasService = _serviceProvider.GetRequiredService(); + } + + + /// + /// 主库初始化单表 + /// + [Fact] + public void MasterInitTableTest() + { + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + db.CodeFirst.InitTables(typeof(SysPrintTemplate)); + Assert.True(true); + } + /// + /// 初始化单表 多表 + /// 注意 海运出口 SeaExport 得手动数据库更新 + /// + [Fact] + public void InitSaasTableTestByCjy() + { + var tenantList = db.Queryable().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); + } + /// + /// 初始化单表 + /// + [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); + } +} \ No newline at end of file