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.
34 lines
1004 B
34 lines
1004 B
3 months ago
|
using Kean.Domain.Task.Models;
|
||
|
using Kean.Domain.Task.Repositories;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Kean.Domain.Task.Strategies
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 简单上架策略
|
||
|
/// </summary>
|
||
|
public sealed class InfeedStrategy_Simple : InfeedStrategy
|
||
|
{
|
||
|
private readonly IWarehouseRepository _warehouseRepository; // 库房仓库
|
||
|
|
||
|
/// <summary>
|
||
|
/// 依赖注入
|
||
|
/// </summary>
|
||
|
public InfeedStrategy_Simple(
|
||
|
IWarehouseRepository warehouseRepository)
|
||
|
{
|
||
|
_warehouseRepository = warehouseRepository;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* 实现 Kean.Domain.Task.Strategies.InfeedStrategy.AutoDestination 方法
|
||
|
*/
|
||
|
public override async Task<Cell> AutoDestination(string pallet, Station original, int? spec, int? goodsid)
|
||
|
{
|
||
|
return (await _warehouseRepository.GetFreeCell(original.Device, spec, pallet, goodsid))
|
||
|
?.FirstOrDefault();
|
||
|
}
|
||
|
}
|
||
|
}
|