Browse Source

增加 合箱 相同库位的校验

Agv分支2024-11-19
郑勃旭 4 months ago
parent
commit
e71a963c7a
  1. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs

8
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<TransferLogEditInput>();
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)

Loading…
Cancel
Save