|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
using Volo.Abp.Domain.Entities.Events;
|
|
|
|
using Volo.Abp.Domain.Entities.Events.Distributed;
|
|
|
|
using Volo.Abp.EventBus;
|
|
|
|
using Volo.Abp.EventBus.Distributed;
|
|
|
|
using Win_in.Sfs.Scp.v1.Domain;
|
|
|
|
using Win_in.Sfs.Scp.WebApi;
|
|
|
|
|
|
|
|
namespace Win_in.Sfs.Scp.v1.Event
|
|
|
|
{
|
|
|
|
public class PartEventHandler
|
|
|
|
: ILocalEventHandler<EntityCreatedEventData<Part>>,
|
|
|
|
ITransientDependency
|
|
|
|
{
|
|
|
|
private readonly ITaPartRepository _taPartRepository;
|
|
|
|
|
|
|
|
public PartEventHandler(ITaPartRepository taPartRepository)
|
|
|
|
{
|
|
|
|
_taPartRepository = taPartRepository;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Task HandleEventAsync(EntityCreatedEventData<Part> eventData)
|
|
|
|
{
|
|
|
|
Console.WriteLine("Local Event:" + eventData.Entity.Id);
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
|
|
|
// throw new System.NotImplementedException();
|
|
|
|
//TODO 根据传入数据新增或修改TA_PART
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|