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 { /// /// 混合模式策略。同批次的优先放同一列,如果没有库位则混放 /// 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 CalCulateWarehouse() { StockInByExist stockInByExist = new(); StockInByNew stockInByNew = new(); StockInByMixing stockInByMixing = new(); stockInByExist.SetNextHandler(stockInByNew); stockInByNew.SetNextHandler(stockInByMixing); return await stockInByExist.CalculateWarehouse(_startArea, _floor, _materiaBatch, null); } } }