Browse Source

新增三方库TYRP接口

dev_DY_CC
周红军 1 year ago
parent
commit
e11d8b5980
  1. 45
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs

45
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Domain.Acl.Location;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using ILocationAclService = Win_in.Sfs.Wms.Store.Domain.Acl.Location.ILocationAclService;
namespace Win_in.Sfs.Wms.Store.Event.DataExchanges
{
public class ThirdLocationNoteEventHandler :
StoreDataExchangeEventHandlerBase<ThirdLocationNote>
, ILocalEventHandler<SfsCreatedEntityEventData<ThirdLocationNote>>
{
private readonly Domain.Acl.Location.ILocationAclService _locationAclService;
public ThirdLocationNoteEventHandler(ILocationAclService locationAclService)
{
_locationAclService = locationAclService;
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationNote> eventData)
{
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
protected override async Task AddExchangeDataAsync(List<ThirdLocationNote> entities)
{
var dtos = ObjectMapper.Map<List<ThirdLocationNote>, List<TransferNoteDTO>>(entities);
var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, EnumExchangeDataType.Transfer, dtos).ConfigureAwait(false);
await AddManyAsync(exchangeData).ConfigureAwait(false);
}
}
}
Loading…
Cancel
Save