自动化立体仓库 - WMS系统
pang.jiabao
1 天以前 ddc6cd417d5e912d5cba297bb7849a1dcf7367be
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.zy.asrs.task;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.WorkService;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.CheckDeepHandler;
import com.zy.asrs.utils.Utils;
import com.zy.common.properties.SlaveProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
 
@Component
@Slf4j
public class CheckDeepScheduler {
 
    @Value("${wcs-slave.doubleDeep}")
    private boolean confirmDeep;
    @Autowired
    private LocDetlService locDetlService;
    @Autowired
    private LocMastService locMastService;
    @Autowired
    private WorkService workService;
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private SlaveProperties slaveProperties;
 
    @Autowired
    private CheckDeepHandler checkDeepHandler;
 
    /**
     * 将两个深库位合并为深浅库位,物料号相同,源库位入库日期早于目标库位对应深库位入库日期,库位状态都为F
     */
//    @Scheduled(cron = "0/30 * * * * ?")
    private void execute() throws ParseException {
//        if (!confirmDeep) return;
        if (true) return;
 
        ReturnT<String> result = checkDeepHandler.start();
        if (!result.isSuccess()) {
            log.error("库位移转===>>浅库位移转到深库位失败");
        }
    }
 
}