自动化立体仓库 - WMS系统
#
zwl
15 小时以前 8d15a90edbf860de951c7981ef8a5b22e4f95151
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
package com.zy.asrs.task;
 
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.AutomaticallyIssueWCSTasksHandler;
import com.zy.asrs.task.handler.WorkMastHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import java.util.Date;
import java.util.List;
 
@Component
public class AutomaticallyIssueWCSTasksScheduler {
    private static final Logger log = LoggerFactory.getLogger(WorkMastScheduler.class);
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private AutomaticallyIssueWCSTasksHandler automaticallyIssueWCSTasksHandler;
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
        List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData();
        if (wrkMasts.isEmpty()) {
            return;
        }
        ReturnT<String> returnT = automaticallyIssueWCSTasksHandler.start(wrkMasts);
    }
}