2
schangxiang@126.com
2024-08-16 b47c50a2a514def7374b32d7194b2c599cba5625
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using iWareCc.DecomposeTask.Entity;
using iWareCc.DecomposeTask.Strategy.出库任务.Chain;
using iWareCommon.Common.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace iWareCc.DecomposeTask.Strategy.出库任务
{
   public class 生成出库堆垛机任务:IStrategy
    {
        private ResultContainer ResultContainer;
        private MainTaskContainer LogisticalTaskContainer;
        private PartTaskContainer DecompositionTaskContainer;
        private PlaceContainer PlaceContainer;
 
        public 生成出库堆垛机任务(ResultContainer resultContainer, MainTaskContainer logisticalTaskContainer, PartTaskContainer decompositionTaskContainer, PlaceContainer placeContainer)
        {
            this.ResultContainer = resultContainer;
            this.LogisticalTaskContainer = logisticalTaskContainer;
            this.DecompositionTaskContainer = decompositionTaskContainer;
            this.PlaceContainer = placeContainer;
        }
 
        public void DoJob()
        {
            var 判断与任务匹配的堆垛机是否空闲 = new 判断堆垛机是否空闲(ResultContainer, LogisticalTaskContainer);
            var 寻找满足库存条件的库位 = new 寻找满足库存条件的库位(ResultContainer,LogisticalTaskContainer, PlaceContainer);
            var 生成堆垛机任务 = new 生成堆垛机任务(ResultContainer,LogisticalTaskContainer, DecompositionTaskContainer, PlaceContainer);
 
            判断与任务匹配的堆垛机是否空闲.NextHandler = 寻找满足库存条件的库位;
            寻找满足库存条件的库位.NextHandler = 生成堆垛机任务;
            判断与任务匹配的堆垛机是否空闲.Handle();
        }
    }
}