自动化立体仓库 - WMS系统
chen.llin
21 小时以前 73e42333948a8143c54218cd26435c2233daf279
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
package com.zy.asrs.task;
 
import com.zy.asrs.task.handler.OrderPakinMoveHistoryHandler;
import com.zy.asrs.task.handler.OrderPakoutMoveHistoryHandler;
import com.zy.common.properties.SchedulerProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
 
 
@Component
public class OrderMoveHistoryScheduler {
    @Autowired
    private OrderPakinMoveHistoryHandler orderPakinMoveHistoryHandler;
 
    @Autowired
    private OrderPakoutMoveHistoryHandler orderPakoutMoveHistoryHandler;
 
    @Resource
    private SchedulerProperties schedulerProperties;
 
    /**
     * 将已完成order和orderDetl移动到log表
     */
    @Scheduled(cron = "0/30 * * * * ?")
    public void execute() {
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        orderPakinMoveHistoryHandler.start();
    }
 
    /**
     * 将已上报order和orderDetl移动到log表
     */
    @Scheduled(cron = "0/30 * * * * ?")
    public void executeOrder() {
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        orderPakoutMoveHistoryHandler.start();
    }
}