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.
43 lines
1019 B
43 lines
1019 B
using Kean.Domain.Stock.Commands;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Domain.Stock.SharedServices
|
|
{
|
|
/// <summary>
|
|
/// 重定位库存
|
|
/// </summary>
|
|
public sealed class SetRollResult
|
|
{
|
|
private readonly ICommandBus _commandBus;
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public SetRollResult(ICommandBus commandBus) =>
|
|
_commandBus = commandBus;
|
|
|
|
/// <summary>
|
|
/// 处理程序
|
|
/// </summary>
|
|
public async Task<string> Handler(
|
|
string barcode,
|
|
string code,
|
|
string message,
|
|
int @operator)
|
|
{
|
|
|
|
SetRollResultCommand command = new SetRollResultCommand
|
|
{
|
|
Barcode = barcode,
|
|
Code = code,
|
|
Message = message,
|
|
Operator = @operator
|
|
};
|
|
await _commandBus.Execute(command);
|
|
return (command.Message);
|
|
|
|
}
|
|
|
|
}
|
|
}
|