|
|
@ -62,6 +62,8 @@ public class InjectionJobEventHandler : |
|
|
|
var entity = eventData.Entity; |
|
|
|
|
|
|
|
await CreateExpectOutAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|
await CreateTransferLibAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -76,6 +78,8 @@ public class InjectionJobEventHandler : |
|
|
|
foreach (var entity in entitys) |
|
|
|
{ |
|
|
|
await CreateExpectOutAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|
await CreateTransferLibAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -127,15 +131,57 @@ public class InjectionJobEventHandler : |
|
|
|
/// 根据是否在 第一层 来创建 是否生成库移任务
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
private async Task CreateTransferLib(InjectionJob injectionJob) |
|
|
|
private async Task CreateTransferLibAsync(InjectionJob injectionJob) |
|
|
|
{ |
|
|
|
var input= new TransferLibRequestEditInput(); |
|
|
|
//input.CallBusinessType = nameof(type);
|
|
|
|
input.CallJobNumber = injectionJob.Number; |
|
|
|
input.CallRequestNumber = injectionJob.InjectionRequestNumber; |
|
|
|
//input.CallServerName=
|
|
|
|
foreach (var detail in injectionJob.Details) |
|
|
|
{ |
|
|
|
var input = new TransferLibRequestEditInput(); |
|
|
|
input.CallBusinessType = nameof(IInjectionJobAppService); |
|
|
|
input.CallJobNumber = injectionJob.Number; |
|
|
|
input.CallRequestNumber = injectionJob.InjectionRequestNumber; |
|
|
|
input.CallServerName = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService"; |
|
|
|
input.Type = "Transfer_Warehouse"; |
|
|
|
input.UseOnTheWayLocation = true; |
|
|
|
var detailInput = new TransferLibRequestDetailInput(); |
|
|
|
detailInput.CallBusinessType = nameof(IInjectionJobAppService); |
|
|
|
detailInput.CallRequestNumber = injectionJob.InjectionRequestNumber; |
|
|
|
detailInput.CallServerName = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService"; |
|
|
|
detailInput.CallJobNumber = injectionJob.Number; |
|
|
|
|
|
|
|
detailInput.JobStatus = EnumJobStatus.Open; |
|
|
|
detailInput.ItemCode=detail.ItemCode; |
|
|
|
detailInput.Qty = detail.RecommendQty; |
|
|
|
detailInput.ArriveDate = detailInput.ArriveDate; |
|
|
|
detailInput.ExpireDate=detailInput.ExpireDate; |
|
|
|
detailInput.ProduceDate = detail.RecommendProduceDate; |
|
|
|
|
|
|
|
detailInput.ToLocationCode = detail.ToLocationCode; |
|
|
|
detailInput.ToWarehouseCode=detail.ToWarehouseCode; |
|
|
|
detailInput.ToLocationErpCode=detail.ToLocationErpCode; |
|
|
|
detailInput.ToLocationGroup=detail.ToLocationGroup; |
|
|
|
detailInput.ToLocationArea= detail.ToLocationArea; |
|
|
|
|
|
|
|
//_transferLibRequestAppService.CreateAsync();
|
|
|
|
detailInput.FromLocationCode = detail.RecommendFromLocationCode; |
|
|
|
detailInput.FromLocationArea = detail.RecommendFromLocationArea; |
|
|
|
detailInput.FromLocationGroup=detail.RecommendFromLocationGroup; |
|
|
|
detailInput.FromLocationErpCode= detail.RecommendFromLocationErpCode; |
|
|
|
detailInput.FromWarehouseCode= detail.RecommendFromWarehouseCode; |
|
|
|
|
|
|
|
detailInput.ToLocationCode = "YL1"; |
|
|
|
detailInput.ToLocationErpCode = "YL1"; |
|
|
|
detailInput.ToLocationGroup = "YL1"; |
|
|
|
detailInput.ToLocationArea = "YL1"; |
|
|
|
|
|
|
|
detailInput.FromLot = detail.RecommendLot; |
|
|
|
detailInput.ToLot=detail.RecommendLot; |
|
|
|
detailInput.Qty=detail.RecommendQty; |
|
|
|
detailInput.StdPackQty = detail.StdPackQty; |
|
|
|
detailInput.Uom=detail.Uom; |
|
|
|
detailInput.SupplierBatch = detail.RecommendSupplierBatch; |
|
|
|
|
|
|
|
await _transferLibRequestAppService.CreateAsync(input); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|