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.
32 lines
760 B
32 lines
760 B
using Kean.Domain.Wcs.Commands;
|
|
using Kean.Domain.Wcs.Repositories;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Domain.Wcs.SharedServices
|
|
{
|
|
/// <summary>
|
|
/// 发送输出命令
|
|
/// </summary>
|
|
public sealed class SetPriority
|
|
{
|
|
private readonly IWcsRepository _wcsRepository; // 控制仓库
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public SetPriority(
|
|
IWcsRepository wcsRepository)
|
|
{
|
|
_wcsRepository = wcsRepository;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 处理程序
|
|
/// </summary>
|
|
public async Task Handler(int task,int priority)
|
|
{
|
|
await _wcsRepository.SetPriority(task, priority);
|
|
}
|
|
}
|
|
}
|