From e71a963c7a5f1dfb511d271a0ed75f472d55efd1 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Tue, 7 Jan 2025 14:54:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=90=88=E7=AE=B1=20?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E5=BA=93=E4=BD=8D=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IntegrationPackingNoteAppService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs index f6706a754..63a614869 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs @@ -76,6 +76,8 @@ public class IntegrationPackingNoteAppService : var transferLogEditInputs = new List(); var outDtos = await _expectOutAppService.GetListByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); + var balanceMainDto = await _balanceAppService.GetByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); + if (outDtos.Any()) { throw new UserFriendlyException($"此物料已经被【任务编号:{outDtos.First().JobNumber}】占用"); @@ -93,6 +95,12 @@ public class IntegrationPackingNoteAppService : foreach (var detailInput in input.Details) { + var balanceDetailDto=await _balanceAppService.GetByPackingCodeAsync(detailInput.PackingCode).ConfigureAwait(false); + if (balanceDetailDto.LocationCode != balanceMainDto.LocationCode) + { + throw new UserFriendlyException($"箱码{detailInput.PackingCode}的库位与合并箱码{balanceMainDto.LocationCode}的库位不一致"); + } + //库存移动 var transferLogEditInput = await BuildTransferLogsAsync(entity, detailInput)