From bd9941950e0e196a4ffd6e5d858ebcd9f3629a62 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Wed, 10 Apr 2024 15:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=BA=93=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Enums/Inventory/EnumTransType.cs | 1 + .../DTOs/ThirdLocationJobDetailDTO.cs | 12 +++++++++--- .../Inputs/ThirdLocationJobDetailInput.cs | 14 +++++++++++--- .../DTOs/ThirdLocationRequestDTO.cs | 5 +++++ .../Inputs/ThirdLocationRequestDetailInput.cs | 7 +++++++ .../Inputs/ThirdLocationRequestImportInput.cs | 9 ++++++++- .../ThirdLocationRequestAppService.cs | 14 +++++--------- .../ThirdLocationJobs/ThirdLocationJobDetail.cs | 9 +++++++-- .../ThirdLocationNotes/ThirdLocationNoteDetail.cs | 2 +- .../ThirdLocationRequestDetail.cs | 7 +++++++ ...dLocationJobDbContextModelCreatingExtensions.cs | 3 ++- ...ationRequestDbContextModelCreatingExtensions.cs | 2 ++ .../ThirdLocationRequestAutoMapperProfile.cs | 7 ++++--- .../Requests/ThirdLocationRequestEventHandler.cs | 5 +++-- 14 files changed, 72 insertions(+), 25 deletions(-) diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs index 567d76ef7..7abb03119 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs @@ -97,6 +97,7 @@ public enum EnumTransType [Display(Name = "新版库内转移")] TransferLib = 68, + /// /// 库间调拨 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs index 509727793..ee8aff47d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs @@ -9,10 +9,16 @@ public class ThirdLocationJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasT { /// - /// 请求库位 + /// 来源库位 /// - [Display(Name = "请求库位")] - public string RequestLocationCode { get; set; } + [Display(Name = "来源库位")] + public string FromLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + public string FromLocationArea { get; set; } /// /// 到库位 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs index c41ae9bff..d57e227fd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs @@ -9,12 +9,20 @@ public class ThirdLocationJobDetailInput : SfsJobRecommendFromDetailInputBase, I { /// - /// 请求库位 + /// 来源库位 /// - [Display(Name = "请求库位")] + [Display(Name = "来源库位")] [Required(ErrorMessage = "{0}是必填项")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestLocationCode { get; set; } + public string FromLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationArea { get; set; } /// /// 到库位 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs index b5b062fae..6d2ed2559 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs @@ -37,4 +37,9 @@ public class ThirdLocationRequestDTO : SfsStoreRequestDTOBase [Display(Name = "目标ERP储位")] public string ToLocationErpCode { get; set; } + + /// + /// 来源库区 + /// + public string FromLocationArea { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs index 913c639c2..b6294d8cd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs @@ -14,6 +14,13 @@ public class ThirdLocationRequestDetailInput : SfsStoreDetailWithQtyInputBase [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToLocationCode { get; set; } + /// + /// 来源库位 + /// + [Display(Name = "来源库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationCode { get; set; } + /// /// 来源库区 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs index e4d261306..ab15491c1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs @@ -31,10 +31,17 @@ public class ThirdLocationRequestImportInput : SfsStoreImportInputBase [Required] public string ToLocationCode { get; set; } + /// + /// 来源库位 + /// + [Display(Name = "来源库位")] + [Required] + public string FromLocationCode { get; set; } + /// /// 来源库区 /// - [Display(Name = "调出库区")] + [Display(Name = "来源库区")] [Required] public string FromLocationArea { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs index 680938428..11983f745 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs @@ -86,7 +86,7 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase - /// 请求库位 + /// 来源库位 /// - public string RequestLocationCode { get; set; } + public string FromLocationCode { get; set; } + + /// + /// 来源库区 + /// + public string FromLocationArea { get; set; } /// /// 到库位 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs index c9b6a230e..46a632a09 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs @@ -7,7 +7,7 @@ public class ThirdLocationNoteDetail : SfsStoreRecommendFromDetailWithFromToEnti { /// - /// 发料时间 + /// 发出时间 /// public DateTime IssueTime { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs index e2f3f79ec..c8e5b798b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs @@ -35,10 +35,17 @@ public class ThirdLocationRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasT /// public string ToWarehouseCode { get; set; } + /// + /// 来源库位 + /// + public string FromLocationCode { get; set; } + /// /// 来源库区 /// public string FromLocationArea { get; set; } + + // /// // /// 在途库库位 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs index 492ecff82..387906be4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs @@ -48,7 +48,8 @@ public static class ThirdLocationJobDbContextModelCreatingExtensions b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs index 8884bf84b..087829cc1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs @@ -46,6 +46,8 @@ public static class ThirdLocationRequestDbContextModelCreatingExtensions b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ExpiredTime).IsRequired(); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs index 46358c324..b336d5613 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs @@ -35,7 +35,7 @@ public partial class StoreEventAutoMapperProfile : Profile ; CreateMap() - .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) .Ignore(x => x.RecommendFromLocationArea) .Ignore(x => x.RecommendFromLocationGroup) .Ignore(x => x.HandledFromLocationArea) @@ -99,7 +99,7 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationGroup) .Ignore(x => x.HandledFromWarehouseCode) - .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.FromLocationCode) .Ignore(x => x.ToLocationCode) .Ignore(x => x.ProdLine) .Ignore(x => x.WorkStation) @@ -123,12 +123,13 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.PlanBeginTime) .Ignore(x => x.PlannedSplitRule) .Ignore(x => x.DeliveryQty) - .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.FromLocationCode) .Ignore(x => x.ToLocationCode) .Ignore(x => x.ProdLine) .Ignore(x => x.WorkStation) .Ignore(x => x.PositionCode) .Ignore(x => x.RecommendType) + .Ignore(x => x.FromLocationArea) .IgnoreIHasRecommendAndHandledFrom(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs index dece75486..ca4800d8d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs @@ -120,7 +120,7 @@ public class ThirdLocationRequestEventHandler { var jobs = new List(); - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, EnumTransSubType.Transfer_Warehouse).ConfigureAwait(false);//库存事务 var toLocationCodes = thirdLocationRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 @@ -245,7 +245,7 @@ public class ThirdLocationRequestEventHandler //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); var detail = ObjectMapper.Map(balance); - detail.RequestLocationCode = thirdLocationRequestDetail.ToLocationCode; + detail.FromLocationCode = thirdLocationRequestDetail.FromLocationCode; detail.WorkStation = thirdLocationRequestDetail.WorkStation; detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime; detail.PositionCode = thirdLocationRequestDetail.PositionCode; @@ -271,6 +271,7 @@ public class ThirdLocationRequestEventHandler detail.ToLocationErpCode = thirdLocationRequestDetail.ToLocationErpCode; detail.ToLocationArea = thirdLocationRequestDetail.ToLocationArea; detail.ToWarehouseCode = thirdLocationRequestDetail.ToWarehouseCode; + detail.FromLocationArea = thirdLocationRequestDetail.FromLocationArea; //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; detail.ProdLine = toLocationGroupCode;