From 4e8c2cdc86dd5a8049b04ac2c60fa70e4e28556c Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Wed, 22 May 2024 14:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E7=AE=B1=E6=97=B6=20PoNumber=20AsnNum?= =?UTF-8?q?ber?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Notes/TransferNotes/TransferNoteAppService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index 8596f6c4e..856a18357 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -11,6 +11,7 @@ using Volo.Abp.Application.Dtos; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Basedata.SplitPackings.Commons; +using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Inventory.Application.Contracts; @@ -40,7 +41,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase private readonly IIssueJobAppService _issueJobAppService; //发料 private readonly IExpectOutAppService _expectOutAppService; // - + private readonly IInventoryLabelAppService _inventoryLabelAppService; @@ -55,6 +56,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService, IInspectJobAppService inspectJobAppService, IIssueJobAppService issueJobAppService, + IInventoryLabelAppService inventoryLabelAppService, IExpectOutAppService expectOutAppService) : base(repository) { _transferNoteManager = transferNoteManager; @@ -65,6 +67,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase _purchaseReceiptRequestAppService = purchaseReceiptRequestAppService; _inspectJobAppService = inspectJobAppService; _issueJobAppService = issueJobAppService; + _inventoryLabelAppService = inventoryLabelAppService; _expectOutAppService = expectOutAppService; } @@ -415,6 +418,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase foreach (var inputDetail in transferNoteEditInput.Details) { SplitPackingRecEditInput packRec = new SplitPackingRecEditInput(); + packRec.OprType = OprTypeEnum.SplitBox; packRec.FromPackingCode = inputDetail.FromPackingCode; //packRec.FromTopPackingCode = inputDetail.; @@ -444,6 +448,13 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase packRec.FromQty = updateJobDetailInput.FromQty; packRec.ToQty = updateJobDetailInput.ToQty; } + //根据箱码在inventoryLabel取采购订单、供应商发货单 + var inventoryLabelDto = await _inventoryLabelAppService.GetByCodeAsync(inputDetail.FromPackingCode).ConfigureAwait(false); + if (inventoryLabelDto != null) + { + packRec.PurchaseInfo_PoNumber = inventoryLabelDto.PoNumber; + packRec.PurchaseInfo_AsnNumber = inventoryLabelDto.AsnNumber; + } recLst.Add(packRec); } var ret = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false);