You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.8 KiB
56 lines
1.8 KiB
using AutoMapper;
|
|
using Kean.Domain.Wcs.Events;
|
|
using Kean.Domain.Wcs.Models;
|
|
using Kean.Domain.Wcs.Repositories;
|
|
using Kean.Domain.Wcs.SharedServices.Proxies;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Domain.Wcs.EventHandlers
|
|
{
|
|
/// <summary>
|
|
/// 接受输入成功时,处理类型 0:CELL表的 初始化
|
|
/// </summary>
|
|
public sealed class AcceptInputSuccessEventHandler_0 : EventHandler<AcceptInputSuccessEvent>
|
|
{
|
|
private readonly TaskProxy _taskProxy; // 任务代理
|
|
private readonly INotification _notification; //
|
|
private readonly IWcsRepository _wcsRepository; // 控制仓库
|
|
private readonly Kean.Infrastructure.Soap.LED.LedService _ledService;
|
|
private readonly ICommandBus _commandBus; // 命令总线
|
|
private readonly IMapper _mapper; // 模型映射
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public AcceptInputSuccessEventHandler_0(
|
|
TaskProxy taskProxy,
|
|
ICommandBus commandBus,
|
|
IMapper mapper,
|
|
IWcsRepository wcsRepository,
|
|
Kean.Infrastructure.Soap.LED.LedService ledService,
|
|
INotification notification)
|
|
{
|
|
_commandBus = commandBus;
|
|
_mapper = mapper;
|
|
_taskProxy = taskProxy;
|
|
_wcsRepository = wcsRepository;
|
|
_ledService = ledService;
|
|
_notification = notification;
|
|
_commandBus = commandBus;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 处理程序
|
|
/// </summary>
|
|
public override async Task Handle(AcceptInputSuccessEvent @event, CancellationToken cancellationToken)
|
|
{
|
|
if (@event.Function == "0")
|
|
{
|
|
//await _wcsRepository.InitCell();
|
|
}
|
|
}
|
|
}
|
|
}
|