Files
ww-jst/wmsjst/JSMachine.WMS.Business/StockIn/ServiceImpl/Strategy/NoMixingStrategy.cs
T
2026-09-02 16:31:50 +08:00

44 lines
1.4 KiB
C#

using JSMachine.WMS.App.Dto;
using JSMachine.WMS.App.Dto.Enum;
using JSMachine.WMS.App.IService;
using JSMachine.WMS.Business.StockIn.IService;
using JSMachine.WMS.Business.StockIn.ServiceImpl.ResponsibilityChain;
using JSMachine.WMS.Infrastructure;
using JSMachine.WMS.Infrastructure.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static JSMachine.WMS.App.Dto.StorageRackDto;
namespace JSMachine.WMS.Business.StockIn.ServiceImpl.Strategy
{
/// <summary>
/// 不混放策略
/// </summary>
public class NoMixingStrategy : IStockInStrategy
{
private static readonly IStorageRackService StorageRackService = GlobalServericeProvidor.GetService<IStorageRackService>();
private FloorEnum _floor;
private TransportEnum _startArea;
private string _materiaBatch;
public NoMixingStrategy(TransportEnum startArea, FloorEnum floor, string materiaBatch)
{
_floor = floor;
_startArea = startArea;
_materiaBatch = materiaBatch;
}
public async Task<StorageRackDto> CalCulateWarehouse()
{
StockInByExist stockInByExist = new();
StockInByNew stockInByNew = new();
stockInByExist.SetNextHandler(stockInByNew);
return await stockInByExist.CalculateWarehouse(_startArea, _floor, _materiaBatch, null);
}
}
}