|
|
@ -26,18 +26,20 @@ public class TransferLibRequestEventHandler |
|
|
|
{ |
|
|
|
private readonly ITransferLibNoteManager _transferLibNoteManager; |
|
|
|
private readonly ILocationAppService _locationAppService; |
|
|
|
private readonly IItemBasicAppService _itemBasicAppService; |
|
|
|
private readonly ITransferLibRequestManager _transferLibRequestManager; |
|
|
|
private readonly ITransferLibJobManager _transferLibJobManager; |
|
|
|
|
|
|
|
protected ILocalEventBus LocalEventBus => LazyServiceProvider.LazyGetRequiredService<ILocalEventBus>(); |
|
|
|
|
|
|
|
public TransferLibRequestEventHandler( |
|
|
|
ITransferLibNoteManager transferLibNoteManager, ILocationAppService locationAppService, ITransferLibRequestManager transferLibRequestManager, ITransferLibJobManager transferLibJobManager) |
|
|
|
ITransferLibNoteManager transferLibNoteManager, ILocationAppService locationAppService, IItemBasicAppService itemBasicAppService, ITransferLibRequestManager transferLibRequestManager, ITransferLibJobManager transferLibJobManager) |
|
|
|
{ |
|
|
|
_transferLibNoteManager = transferLibNoteManager; |
|
|
|
_locationAppService = locationAppService; |
|
|
|
_transferLibRequestManager = transferLibRequestManager; |
|
|
|
_transferLibJobManager = transferLibJobManager; |
|
|
|
_itemBasicAppService = itemBasicAppService; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -81,6 +83,27 @@ public class TransferLibRequestEventHandler |
|
|
|
var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT) |
|
|
|
.ConfigureAwait(false); |
|
|
|
|
|
|
|
foreach(var item in input.Details) |
|
|
|
{ |
|
|
|
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(item.ItemCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if(itemBasicDto!=null) |
|
|
|
{ |
|
|
|
item.ItemDesc1 = itemBasicDto.Desc1; |
|
|
|
item.ItemDesc2 = itemBasicDto.Desc2; |
|
|
|
item.ItemName = itemBasicDto.Name; |
|
|
|
item.Uom = itemBasicDto.BasicUom; |
|
|
|
item.StdPackQty = itemBasicDto.StdPackQty; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"未找到此物品{item.ItemCode}的信息"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var transferOnTheWayLocation =
|
|
|
|
// await SettingManager.GetOrNullGlobalAsync(StoreSettings.Common.TransferOnTheWayLocation)
|
|
|
|
// .ConfigureAwait(false);
|
|
|
|