山东雷驰
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.
 
 
 
 

94 lines
3.9 KiB

using Kean.Application.Command.Interfaces;
using Kean.Application.Command.ViewModels;
using Kean.Domain.Stock.Commands;
using System;
using System.Threading.Tasks;
namespace Kean.Application.Command.Implements
{
/// <summary>
/// 库存交互聚合颗粒
/// </summary>
partial class AggregateGrain
{
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Inbound 方法
*/
public Task<Failure> Inbound(InboundCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).Inbound(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Outbound 方法
*/
public Task<Failure> Outbound(OutboundCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).Outbound(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Update 方法
*/
public Task<Failure> Update(UpdateCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).Update(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Combine 方法
*/
public Task<Failure> Combine(CombineCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).Combine(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.Inventory 方法
*/
public Task<Failure> Inventory(InventoryCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).Inventory(command);
/////////////////////////////////////////////
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.ScanInbound 方法
*/
public Task<(string Device, Failure Failure)> ScanInbound(ScanInboundCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).ScanInbound(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.PalletIn 方法
*/
public Task<Failure> PalletIn(PalletInCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).PalletIn(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.PreScanInbound 方法
*/
public Task<(string Device, Failure Failure)> PreScanInbound(PreScanInboundCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).PreScanInbound(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.RecordInterface 方法
*/
public Task<Failure> RecordInterface(InterfaceRecordCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).RecordInterface(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.SetRollResult 方法
*/
public Task<Failure> SetRollResult(SetRollResultCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).SetRollResult(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.PreSetQcStatus 方法
*/
public Task<(int barcodeCount, Failure Failure)> PreSetQcStatus(PreSetQcStatusCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).PreSetQcStatus(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.ChangeStorageProperty 方法
*/
public Task<Failure> ChangeStorageProperty(ChangeStoragePropertyCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).ChangeStorageProperty(command);
/*
* 实现 Kean.Application.Command.Interfaces.IAggregateGrain.ChangeStorageProperty 方法
*/
public Task<Failure> BatchReFeedback(BatchReFeedbackCommand command) =>
GrainFactory.GetGrain<IStockGrain>(Guid.NewGuid()).BatchReFeedback(command);
}
}