|
@ -67,7 +67,7 @@ public class IntegrationPackingNoteAppService : |
|
|
public override async Task<IntegrationPackingNoteDTO> CreateAsync(IntegrationPackingNoteEditInput input) |
|
|
public override async Task<IntegrationPackingNoteDTO> CreateAsync(IntegrationPackingNoteEditInput input) |
|
|
{ |
|
|
{ |
|
|
var transferLogEditInputs = new List<TransferLogEditInput>(); |
|
|
var transferLogEditInputs = new List<TransferLogEditInput>(); |
|
|
var outDtos=await _expectOutAppService.GetListByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); |
|
|
var outDtos = await _expectOutAppService.GetListByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); |
|
|
if (outDtos.Any()) |
|
|
if (outDtos.Any()) |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"此物料已经被【任务编号:{outDtos.First().JobNumber}】占用"); |
|
|
throw new UserFriendlyException($"此物料已经被【任务编号:{outDtos.First().JobNumber}】占用"); |
|
@ -80,7 +80,8 @@ public class IntegrationPackingNoteAppService : |
|
|
var splitPackingRecDto = splitPackingRecDtos.First(); |
|
|
var splitPackingRecDto = splitPackingRecDtos.First(); |
|
|
var inventoryLabelWithoutCodeCreateInput = new InventoryLabelWithoutCodeCreateInput |
|
|
var inventoryLabelWithoutCodeCreateInput = new InventoryLabelWithoutCodeCreateInput |
|
|
{ |
|
|
{ |
|
|
Qty = detailInput.Qty, ItemCode = detailInput.ItemCode, |
|
|
Qty = detailInput.Qty, |
|
|
|
|
|
ItemCode = detailInput.ItemCode, |
|
|
SupplierCode = detailInput.SupplierCode, |
|
|
SupplierCode = detailInput.SupplierCode, |
|
|
Lot = detailInput.Lot, |
|
|
Lot = detailInput.Lot, |
|
|
Uom = detailInput.Uom, |
|
|
Uom = detailInput.Uom, |
|
@ -114,7 +115,7 @@ public class IntegrationPackingNoteAppService : |
|
|
SupplierSimpleName = detailInput.SupplierSimpleName, |
|
|
SupplierSimpleName = detailInput.SupplierSimpleName, |
|
|
Team = string.Empty, |
|
|
Team = string.Empty, |
|
|
}; |
|
|
}; |
|
|
var inventoryLabelDto=await _inventoryLabelAppService.GenerateAndCreateAsync(inventoryLabelWithoutCodeCreateInput).ConfigureAwait(false); |
|
|
var inventoryLabelDto = await _inventoryLabelAppService.GenerateAndCreateAsync(inventoryLabelWithoutCodeCreateInput).ConfigureAwait(false); |
|
|
var splitPackingRecEditInputs = new List<SplitPackingRecEditInput>() |
|
|
var splitPackingRecEditInputs = new List<SplitPackingRecEditInput>() |
|
|
{ |
|
|
{ |
|
|
new SplitPackingRecEditInput() |
|
|
new SplitPackingRecEditInput() |
|
@ -162,14 +163,14 @@ public class IntegrationPackingNoteAppService : |
|
|
await _splitPackingRecAppService.BatchInsertAsync(splitPackingRecEditInputs).ConfigureAwait(false); |
|
|
await _splitPackingRecAppService.BatchInsertAsync(splitPackingRecEditInputs).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
//创建标签
|
|
|
//创建标签
|
|
|
var dto= await base.CreateAsync(input).ConfigureAwait(false); |
|
|
var dto = await base.CreateAsync(input).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
//库存移动
|
|
|
//库存移动
|
|
|
var transferLogEditInput=await BuildTransferLogsAsync(dto, detailInput, splitPackingRecEditInputs.First()).ConfigureAwait(false); |
|
|
var transferLogEditInput = await BuildTransferLogsAsync(dto, detailInput, splitPackingRecEditInputs.First()).ConfigureAwait(false); |
|
|
transferLogEditInputs.Add(transferLogEditInput); |
|
|
transferLogEditInputs.Add(transferLogEditInput); |
|
|
} |
|
|
} |
|
|
|
|
|
throw new UserFriendlyException("123123"); |
|
|
await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false); |
|
|
// await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
@ -231,6 +232,6 @@ public class IntegrationPackingNoteAppService : |
|
|
|
|
|
|
|
|
private async Task CreateLabelAsync() |
|
|
private async Task CreateLabelAsync() |
|
|
{ |
|
|
{ |
|
|
var batchInsert=await _splitPackingRecAppService.BatchInsertAsync().ConfigureAwait(false); |
|
|
//var batchInsert=await _splitPackingRecAppService.BatchInsertAsync().ConfigureAwait(false);
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|