first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using JSMachine.WMS.App.Dto;
|
||||
using JSMachine.WMS.App.Dto.Enum;
|
||||
using JSMachine.WMS.Business.StockIn.IService;
|
||||
using JSMachine.WMS.Business.StockIn.ServiceImpl.ResponsibilityChain;
|
||||
|
||||
namespace JSMachine.WMS.Business.StockIn.ServiceImpl.Strategy
|
||||
{
|
||||
/// <summary>
|
||||
/// 混合模式策略。同批次的优先放同一列,如果没有库位则混放
|
||||
/// </summary>
|
||||
public class MixedModeStrategy : IStockInStrategy
|
||||
{
|
||||
private FloorEnum _floor;
|
||||
private TransportEnum _startArea;
|
||||
private string _materiaBatch;
|
||||
public MixedModeStrategy(TransportEnum startArea, FloorEnum floor, string materiaBatch)
|
||||
{
|
||||
_floor = floor;
|
||||
_startArea = startArea;
|
||||
_materiaBatch = materiaBatch;
|
||||
}
|
||||
|
||||
public async Task<StorageRackDto> CalCulateWarehouse()
|
||||
{
|
||||
StockInByExist stockInByExist = new();
|
||||
StockInByNew stockInByNew = new();
|
||||
StockInByMixing stockInByMixing = new();
|
||||
|
||||
stockInByExist.SetNextHandler(stockInByNew);
|
||||
stockInByNew.SetNextHandler(stockInByMixing);
|
||||
|
||||
return await stockInByExist.CalculateWarehouse(_startArea, _floor, _materiaBatch, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user