From 44511ce4bc51d73e13791a66f7aca145b2f0cec4 Mon Sep 17 00:00:00 2001 From: Zheng Date: Fri, 12 Apr 2024 21:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B3=A8=E5=A1=91?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InjectionJobs/InjectionJobAppService.cs | 22 +++++-- .../InjectionJobs/InjectionJobManager.cs | 31 ++++++++++ .../Jobs/InjectionJobEventHandler.cs | 62 ++++++++++++------- .../TransferLibRequestEventHandler.cs | 2 + 4 files changed, 89 insertions(+), 28 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs index f723dc24a..0b407c39c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs @@ -41,6 +41,12 @@ public class InjectionJobAppService _transferLibJobAppService = transferLibJobAppService; } + /// + /// 批量创建 + /// + /// + /// + [HttpPost("create-many")] public override async Task> CreateManyAsync(List inputs) { foreach (var input in inputs) @@ -51,6 +57,12 @@ public class InjectionJobAppService return await base.CreateManyAsync(inputs).ConfigureAwait(false); } + /// + /// 创建 + /// + /// + /// + [HttpPost("")] public override async Task CreateAsync(InjectionJobEditInput input) { await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false); @@ -70,10 +82,8 @@ public class InjectionJobAppService var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - if (loctionDto.RowCode != 1) + if (loctionDto.RowCode == 1) { - input.JobStatus = EnumJobStatus.Wait; - jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate; jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode; jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate; @@ -102,6 +112,10 @@ public class InjectionJobAppService jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch; jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode; } + else + { + input.JobStatus = EnumJobStatus.Wait; + } } [HttpPost("cancel-by-request/{injectionNumber}")] @@ -135,7 +149,7 @@ public class InjectionJobAppService return ObjectMapper.Map, List>(entitys); } - [HttpPost("Do-Call-Back")] + [HttpPost("do-call-back")] public async Task> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum) { var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs index 4f6514f53..4ef7158a4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs @@ -30,6 +30,37 @@ public class InjectionJobManager : SfsJobManagerBase @@ -148,29 +150,41 @@ public class InjectionJobEventHandler : detailInput.JobStatus = EnumJobStatus.Open; detailInput.ItemCode = detail.ItemCode; - //detailInput.Qty = detail.RecommendFromQty; - //detailInput.ArriveDate = detailInput.ArriveDate; - //detailInput.ExpireDate = detailInput.ExpireDate; - //detailInput.ProduceDate = detail.RecommendFromProduceDate; - - //detailInput.ToLocationCode = detail.RecommendToLocationCode; - //detailInput.ToWarehouseCode = detail.RecommendToWarehouseCode; - //detailInput.ToLocationErpCode = detail.RecommendToLocationErpCode; - //detailInput.ToLocationGroup = detail.RecommendToLocationGroup; - //detailInput.ToLocationArea = detail.RecommendToLocationArea; - - //detailInput.FromLocationCode = detail.RecommendFromLocationCode; - //detailInput.FromLocationArea = detail.RecommendFromLocationArea; - //detailInput.FromLocationGroup = detail.RecommendFromLocationGroup; - //detailInput.FromLocationErpCode = detail.RecommendFromLocationErpCode; - //detailInput.FromWarehouseCode = detail.RecommendFromWarehouseCode; - - //detailInput.FromLot = detail.RecommendFromLot; - //detailInput.ToLot = detail.RecommendToLot; - //detailInput.Qty = detail.RecommendFromQty; - //detailInput.StdPackQty = detail.StdPackQty; - //detailInput.Uom = detail.Uom; - //detailInput.SupplierBatch = detail.RecommendFromSupplierBatch; + detailInput.StdPackQty = detail.StdPackQty; + detailInput.Uom = detail.Uom; + detailInput.Status = detail.Status; + + detailInput.RecommendFromQty = detail.RecommendFromQty; + detailInput.RecommendFromLot = detail.RecommendFromLot; + detailInput.RecommendFromPackingCode = detailInput.RecommendFromPackingCode; + detailInput.RecommendToLot = detail.RecommendToLot; + + detailInput.RecommendFromArriveDate = detail.RecommendFromArriveDate; + detailInput.RecommendFromExpireDate = detail.RecommendFromExpireDate; + detailInput.RecommendFromProduceDate = detail.RecommendFromProduceDate; + detailInput.RecommendFromSupplierBatch = detail.RecommendFromSupplierBatch; + + detailInput.RecommendFromLocationCode = detail.RecommendFromLocationCode; + detailInput.RecommendFromLocationGroup = detail.RecommendFromLocationGroup; + detailInput.RecommendFromLocationArea = detail.RecommendFromLocationArea; + detailInput.RecommendFromLocationErpCode = detail.RecommendFromLocationErpCode; + detailInput.RecommendFromWarehouseCode = detail.RecommendFromWarehouseCode; + + detailInput.RecommendToQty = detail.RecommendToQty; + detailInput.RecommendToLot = detail.RecommendToLot; + detailInput.RecommendToPackingCode = detailInput.RecommendToPackingCode; + detailInput.RecommendToLot = detail.RecommendToLot; + + detailInput.RecommendToArriveDate = detail.RecommendToArriveDate; + detailInput.RecommendToExpireDate = detail.RecommendToExpireDate; + detailInput.RecommendToProduceDate = detail.RecommendToProduceDate; + detailInput.RecommendToSupplierBatch = detail.RecommendToSupplierBatch; + + detailInput.RecommendToLocationCode = detail.RecommendToLocationCode; + detailInput.RecommendToLocationGroup = detail.RecommendToLocationGroup; + detailInput.RecommendToLocationArea = detail.RecommendToLocationArea; + detailInput.RecommendToLocationErpCode = detail.RecommendToLocationErpCode; + detailInput.RecommendToWarehouseCode = detail.RecommendToWarehouseCode; await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false); } @@ -216,7 +230,7 @@ public class InjectionJobEventHandler : var loctionDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode) .ConfigureAwait(false); - if (loctionDto.ColumnCode != 1) + if (loctionDto.RowCode == 1) { return true; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs index d9b69b984..2ad89e65d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs @@ -52,6 +52,8 @@ public class TransferLibRequestEventHandler var entity = eventData.Entity; var enumTransSubType = Enum.Parse(entity.Type); + return; + if (entity.DirectCreateNote) { //todo 等云峰做完处理