Browse Source

拆箱时 PoNumber AsnNumber

dev_DY_CC
刘云峰 12 months ago
parent
commit
4e8c2cdc86
  1. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

13
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.Application.Contracts;
using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Basedata.SplitPackings.Commons; 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;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Inventory.Application.Contracts;
@ -40,7 +41,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
private readonly IIssueJobAppService _issueJobAppService; //发料 private readonly IIssueJobAppService _issueJobAppService; //发料
private readonly IExpectOutAppService _expectOutAppService; // private readonly IExpectOutAppService _expectOutAppService; //
private readonly IInventoryLabelAppService _inventoryLabelAppService;
@ -55,6 +56,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService, IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService,
IInspectJobAppService inspectJobAppService, IInspectJobAppService inspectJobAppService,
IIssueJobAppService issueJobAppService, IIssueJobAppService issueJobAppService,
IInventoryLabelAppService inventoryLabelAppService,
IExpectOutAppService expectOutAppService) : base(repository) IExpectOutAppService expectOutAppService) : base(repository)
{ {
_transferNoteManager = transferNoteManager; _transferNoteManager = transferNoteManager;
@ -65,6 +67,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
_purchaseReceiptRequestAppService = purchaseReceiptRequestAppService; _purchaseReceiptRequestAppService = purchaseReceiptRequestAppService;
_inspectJobAppService = inspectJobAppService; _inspectJobAppService = inspectJobAppService;
_issueJobAppService = issueJobAppService; _issueJobAppService = issueJobAppService;
_inventoryLabelAppService = inventoryLabelAppService;
_expectOutAppService = expectOutAppService; _expectOutAppService = expectOutAppService;
} }
@ -415,6 +418,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
foreach (var inputDetail in transferNoteEditInput.Details) foreach (var inputDetail in transferNoteEditInput.Details)
{ {
SplitPackingRecEditInput packRec = new SplitPackingRecEditInput(); SplitPackingRecEditInput packRec = new SplitPackingRecEditInput();
packRec.OprType = OprTypeEnum.SplitBox; packRec.OprType = OprTypeEnum.SplitBox;
packRec.FromPackingCode = inputDetail.FromPackingCode; packRec.FromPackingCode = inputDetail.FromPackingCode;
//packRec.FromTopPackingCode = inputDetail.; //packRec.FromTopPackingCode = inputDetail.;
@ -444,6 +448,13 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
packRec.FromQty = updateJobDetailInput.FromQty; packRec.FromQty = updateJobDetailInput.FromQty;
packRec.ToQty = updateJobDetailInput.ToQty; 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); recLst.Add(packRec);
} }
var ret = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false); var ret = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false);

Loading…
Cancel
Save