|
|
@ -59,6 +59,8 @@ public class DeliverNoteEventHandler |
|
|
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<DeliverNote>> eventDatas) |
|
|
|
{ |
|
|
|
var entitys = eventDatas.Entity; |
|
|
|
if (await SettingManager.IsTrueAsync(StoreSettings.Common.EnableCustomerLocation).ConfigureAwait(false)) |
|
|
|
{ |
|
|
|
var transferLogs = new List<TransferLogEditInput>(); |
|
|
|
foreach (var entity in entitys) |
|
|
|
{ |
|
|
@ -68,6 +70,20 @@ public class DeliverNoteEventHandler |
|
|
|
} |
|
|
|
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var transactions = new List<TransactionEditInput>(); |
|
|
|
foreach (var entity in entitys) |
|
|
|
{ |
|
|
|
transactions.AddRange(BuildTransactions(entity)); |
|
|
|
|
|
|
|
await SetRequestStatusAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
await TransactionAppService.AddManyAsync(transactions).ConfigureAwait(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#region 私有
|
|
|
|
|
|
|
|
private async Task AddTransactionsAsync(DeliverNote deliverNote) |
|
|
|