You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
2 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
using Volo.Abp.DependencyInjection;
|
||
|
using Volo.Abp.Domain.Entities.Events.Distributed;
|
||
|
using Volo.Abp.EventBus.Distributed;
|
||
|
using Volo.Abp.ObjectMapping;
|
||
|
using Volo.Abp.Uow;
|
||
|
using Win_in.Sfs.Shared.Event;
|
||
|
using Win_in.Sfs.Wms.Inventory.Domain;
|
||
|
|
||
|
namespace Win_in.Sfs.Wms.Inventory
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 订阅发料任务创建事件,生成已占用库存
|
||
|
/// </summary>
|
||
|
public class IssueJobCreatedEventHandler :
|
||
|
IDistributedEventHandler<EntityCreatedEto<IssueJobETO>>,
|
||
|
ITransientDependency
|
||
|
{
|
||
|
private readonly IInventoryOccupiedManager _inventoryOccupiedManager;
|
||
|
public IssueJobCreatedEventHandler(
|
||
|
IInventoryOccupiedManager inventoryOccupiedManager
|
||
|
)
|
||
|
{
|
||
|
_inventoryOccupiedManager = inventoryOccupiedManager;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 发料任务创建时,生成已占用库存
|
||
|
/// </summary>
|
||
|
/// <param name="eventData"></param>
|
||
|
/// <returns></returns>
|
||
|
[UnitOfWork]
|
||
|
public virtual async Task HandleEventAsync(EntityCreatedEto<IssueJobETO> eventData)
|
||
|
{
|
||
|
await _inventoryOccupiedManager.HandleEventAsync(eventData.Entity);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|