|
@ -3,6 +3,7 @@ using System.Linq; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
using Volo.Abp.EventBus; |
|
|
using Volo.Abp.EventBus; |
|
|
using Volo.Abp.Uow; |
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
using Win_in.Sfs.Shared.Domain.Shared; |
|
|
using Win_in.Sfs.Shared.Event; |
|
|
using Win_in.Sfs.Shared.Event; |
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|
|
using Win_in.Sfs.Wms.Store.Domain; |
|
|
using Win_in.Sfs.Wms.Store.Domain; |
|
@ -37,13 +38,31 @@ public class PurchaseReturnNoteEventHandler |
|
|
{ |
|
|
{ |
|
|
await detail.TrySetLocationAsync(LocationAclService, detail.LocationCode).ConfigureAwait(false); |
|
|
await detail.TrySetLocationAsync(LocationAclService, detail.LocationCode).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
//QAD
|
|
|
|
|
|
var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, dtos).ConfigureAwait(false); |
|
|
//2023-12-6上架前退货不传入接口
|
|
|
await AddManyAsync(exchangeData).ConfigureAwait(false); |
|
|
var result = new List<PurchaseReturnNoteDTO>(); |
|
|
|
|
|
foreach (var issueNoteDto in dtos) |
|
|
|
|
|
{ |
|
|
|
|
|
if (issueNoteDto.ReturnType==EnumPurchaseReturnType.AfterPuton) |
|
|
|
|
|
{ |
|
|
|
|
|
result.Add(issueNoteDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (result.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
//QAD
|
|
|
|
|
|
var exchangeData = |
|
|
|
|
|
await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, result) |
|
|
|
|
|
.ConfigureAwait(false); |
|
|
|
|
|
await AddManyAsync(exchangeData).ConfigureAwait(false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//EOS
|
|
|
//EOS
|
|
|
var exchangeData_eos = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.EOS, ExchangeDataType, dtos).ConfigureAwait(false); |
|
|
var exchangeData_eos = |
|
|
|
|
|
await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.EOS, ExchangeDataType, result) |
|
|
|
|
|
.ConfigureAwait(false); |
|
|
await AddManyAsync(exchangeData_eos).ConfigureAwait(false); |
|
|
await AddManyAsync(exchangeData_eos).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|