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

95 lines
3.9 KiB

3 months ago
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);
}
}