Browse Source

业务库移更新

dev_DY_CC
周红军 11 months ago
parent
commit
f44115e381
  1. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  2. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/TransferLibJobEventHandler.cs
  3. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs

@ -219,6 +219,11 @@ public class TransferLibJobAppService
var balanceDto=await _balanceAppService.GetByPackingCodeAsync(detail.HandledToPackingCode).ConfigureAwait(false);
if (balanceDto == null)
{
throw new UserFriendlyException($"箱码{detail.HandledToPackingCode}没有找到库存");
}
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode)
.ConfigureAwait(false);
var toLocationDto =

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/TransferLibJobEventHandler.cs

@ -61,6 +61,20 @@ public class TransferLibJobEventHandler :
{
var createInput = ObjectMapper.Map<TransferLibJob, TransferLibNoteEditInput>(entity);
createInput.Confirmed = true;
createInput.ConfirmTime = Clock.Now;
foreach(var item in createInput.Details)
{
if(string.IsNullOrEmpty(item.HandledFromLot))
{
item.HandledFromLot = "";
}
if (string.IsNullOrEmpty(item.HandledToLot))
{
item.HandledToLot = "";
}
}
return createInput;
}
}

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

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

Loading…
Cancel
Save