|
|
@ -20,6 +20,7 @@ namespace Win_in.Sfs.Wms.Store.Event.Transactions; |
|
|
|
public class DeliverNoteEventHandler |
|
|
|
: StoreInventoryEventHandlerBase |
|
|
|
, ILocalEventHandler<SfsCreatedEntityEventData<DeliverNote>> |
|
|
|
, ILocalEventHandler<SfsCreatedEntityEventData<List<DeliverNote>>> |
|
|
|
{ |
|
|
|
private const EnumTransType TransType = EnumTransType.Deliver; |
|
|
|
private readonly IDeliverRequestAppService _deliverRequestApp; |
|
|
@ -49,7 +50,24 @@ public class DeliverNoteEventHandler |
|
|
|
|
|
|
|
await SetRequestStatusAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 创建后
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="eventData"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[UnitOfWork] |
|
|
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<DeliverNote>> eventDatas) |
|
|
|
{ |
|
|
|
var entitys = eventDatas.Entity; |
|
|
|
var transferLogs = new List<TransferLogEditInput>(); |
|
|
|
foreach (var entity in entitys) |
|
|
|
{ |
|
|
|
transferLogs.AddRange(BuildTransferLogs(entity)); |
|
|
|
|
|
|
|
await SetRequestStatusAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); |
|
|
|
} |
|
|
|
#region 私有
|
|
|
|
|
|
|
|
private async Task AddTransactionsAsync(DeliverNote deliverNote) |
|
|
|