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.
125 lines
5.1 KiB
125 lines
5.1 KiB
using Kean.Application.Command.Interfaces;
|
|
using Kean.Application.Command.ViewModels;
|
|
using Kean.Domain.Task.Commands;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Application.Command.Implements
|
|
{
|
|
/// <summary>
|
|
/// 任务交互聚合颗粒
|
|
/// </summary>
|
|
partial class AggregateGrain
|
|
{
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Infeed 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> Infeed(InfeedCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Infeed(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Outfeed 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> Outfeed(OutfeedCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Outfeed(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Transfer 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> Transfer(TransferCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Transfer(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Bypass 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> Bypass(BypassCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Bypass(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Execute 方法
|
|
*/
|
|
public Task<Failure> Execute(ExecuteCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Execute(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Cancel 方法
|
|
*/
|
|
public Task<Failure> Cancel(CancelCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Cancel(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Complete 方法
|
|
*/
|
|
public Task<Failure> Complete(CompleteCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Complete(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Block 方法
|
|
*/
|
|
public Task<Failure> Block(BlockCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).Block(command);
|
|
|
|
//////////////////////////////////////////////
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.ApplyOut 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> ApplyOut(ApplyOutCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).ApplyOut(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.PalletOut 方法
|
|
*/
|
|
public Task<(int Id, Failure Failure)> PalletOut(PalletOutCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).PalletOut(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.PreApplyOut 方法
|
|
*/
|
|
public Task<(string barcode, Failure failure)> PreApplyOut(PreApplyOutCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).PreApplyOut(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.ReuploadHiWMS 方法
|
|
*/
|
|
public Task<Failure> ReuploadHiWMS(ReuploadTaskCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).ReuploadHiWMS(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.SetRollResult 方法
|
|
*/
|
|
public Task<Failure> SetRollTask(SetRollTaskCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).SetRollTask(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.SetTaskState 方法
|
|
*/
|
|
public Task<Failure> SetTaskState(SetTaskStateCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).SetTaskState(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.CallDelete 方法
|
|
*/
|
|
public Task<Failure> CallDelete(CallDeleteCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).CallDelete(command);
|
|
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.SetPriority 方法
|
|
*/
|
|
public Task<Failure> SetPriority(SetPriorityCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).SetPriority(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.CancelAgvApplyOut 方法
|
|
*/
|
|
public Task<Failure> CancelAgvApplyOut(CancelAgvApplyOutCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).CancelAgvApplyOut(command);
|
|
|
|
/*
|
|
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.AutoPalletOut 方法
|
|
*/
|
|
public Task<Failure> AutoPalletOut(AutoPalletOutCommand command) =>
|
|
GrainFactory.GetGrain<ITaskGrain>(Guid.NewGuid()).AutoPalletOut(command);
|
|
|
|
}
|
|
}
|