|
|
@ -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) |
|
|
|