From 1b4c022450ccc95e61d57794f524e9f24fb153a0 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Fri, 17 May 2024 16:36:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=BA=93=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ThirdLocationRequestAppService.cs | 29 ++++++++++-- .../ThirdLocationRequestEventHandler.cs | 46 ++++++++++--------- 2 files changed, 51 insertions(+), 24 deletions(-) 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 ef13a5b7d..ed2c4976e 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 @@ -103,12 +103,35 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase private async Task SetRequestAutoPropertiesAsync(ThirdLocationRequestEditInput entity) { - var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.TransferLib, EnumTransSubType.Transfer_Warehouse).ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); 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 d5d1702be..3e91afd87 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 @@ -246,9 +246,8 @@ public class ThirdLocationRequestEventHandler { continue; } - - var fromLocationCode = jobDetails[0].RecommendFromLocationCode; - var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); + + var fromLocation = await _locationAppService.GetByCodeAsync(thirdLocationRequestDetail.FromLocationCode).ConfigureAwait(false); var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); if (job == null || job.Details.Any(p => p.ToLocationCode != thirdLocationRequestDetail.ToLocationCode)) { @@ -269,11 +268,11 @@ public class ThirdLocationRequestEventHandler { ThirdLocationJobEditInput job; job = ObjectMapper.Map(thirdLocationRequest); - job.JobType = EnumJobType.IssueJob; + job.JobType = EnumJobType.Transfer; job.JobStatus = EnumJobStatus.Open; job.WorkGroupCode = fromLocation.WorkGroupCode; job.WarehouseCode = fromLocation.WarehouseCode; - job.ProdLine = fromLocation.LocationGroupCode; + //job.ProdLine = fromLocation.LocationGroupCode; job.Worker = thirdLocationRequest.Worker; if (string.IsNullOrEmpty(job.Worker)) { @@ -313,8 +312,8 @@ public class ThirdLocationRequestEventHandler } jobDetails.Add(detail); - thirdLocationRequestDetail.IssuedQty += recommend.Qty; + //thirdLocationRequestDetail.IssuedQty += recommend.Qty; //await _thirdLocationRequestManager.UpdateDetailsAsync(thirdLocationRequest).ConfigureAwait(false); } @@ -334,21 +333,26 @@ public class ThirdLocationRequestEventHandler detail.PositionCode = thirdLocationRequestDetail.PositionCode; detail.RecommendType = thirdLocationRequestDetail.RecommendType; - detail.RecommendPackingCode = balance.PackingCode; - detail.RecommendContainerCode = balance.ContainerCode; - detail.RecommendSupplierBatch = balance.SupplierBatch; - detail.RecommendProduceDate = balance.ProduceDate; - detail.RecommendExpireDate = balance.ExpireDate; - detail.RecommendLot = balance.Lot; - detail.RecommendProduceDate = balance.ProduceDate; - detail.RecommendArriveDate = balance.ArriveDate; - detail.RecommendFromLocationArea = balance.LocationArea; - detail.RecommendFromLocationCode = balance.LocationCode; - detail.RecommendFromLocationErpCode = balance.LocationErpCode; - detail.RecommendFromLocationGroup = balance.LocationGroup; - detail.RecommendFromWarehouseCode = balance.WarehouseCode; - detail.RecommendQty = balance.Qty; - detail.Uom = balance.Uom; + //detail.RecommendPackingCode = balance.PackingCode; + //detail.RecommendContainerCode = balance.ContainerCode; + //detail.RecommendSupplierBatch = balance.SupplierBatch; + //detail.RecommendProduceDate = balance.ProduceDate; + //detail.RecommendExpireDate = balance.ExpireDate; + //detail.RecommendLot = balance.Lot; + //detail.RecommendProduceDate = balance.ProduceDate; + //detail.RecommendArriveDate = balance.ArriveDate; + //detail.RecommendFromLocationArea = balance.LocationArea; + //detail.RecommendFromLocationCode = balance.LocationCode; + //detail.RecommendFromLocationErpCode = balance.LocationErpCode; + //detail.RecommendFromLocationGroup = balance.LocationGroup; + //detail.RecommendFromWarehouseCode = balance.WarehouseCode; + //detail.RecommendQty = balance.Qty; + //detail.Uom = balance.Uom; + + detail.RecommendPackingCode = ""; + detail.RecommendLot = ""; + detail.RecommendFromLocationCode = thirdLocationRequestDetail.FromLocationCode; + detail.RecommendFromLocationErpCode = ""; detail.ToLocationCode = thirdLocationRequestDetail.ToLocationCode; detail.ToLocationErpCode = thirdLocationRequestDetail.ToLocationErpCode;