自动化立体仓库 - WMS系统
*
lsh
9 天以前 d9eeceed86c1ce43c73dda00a108595a078a8f3d
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
package com.zy.asrs.task;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.entity.BasJarMast;
import com.zy.asrs.service.BasJarMastService;
import com.zy.asrs.task.handler.WrkMastExecuteHandler;
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.List;
 
 
/**
 * Created by Monkey D. Luffy on 2024.06.27
 * 亳州煜星..............以下.............亳州煜星.............硫化罐区域执行任务
 */
@Component
public class WrkMastExecuteScheduler {
 
    private static final Logger log = LoggerFactory.getLogger(WrkMastExecuteScheduler.class);
    private static final int[][] execute = new int[][]{{1,5},{2,5},{3,5},{4,5},{5,7},{6,7},{7,5},{8,5},{9,4},{10,5},{11,5},{100,100}};
 
 
    @Autowired
    private WrkMastExecuteHandler wrkMastExecuteHandler;
    @Autowired
    private BasJarMastService basJarMastService;
 
 
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
        for (int[] excuteNow : execute){
            try{
                wrkMastExecuteHandler.start(excuteNow);
            } catch (Exception e){
                log.error("硫化罐任务转历史档案失败!!!");
            }
        }
    }
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void executeJarMast(){
        List<BasJarMast> basJarMastList = basJarMastService.selectList(new EntityWrapper<BasJarMast>().eq("status", 17));
        for (BasJarMast basJarMast : basJarMastList){
            try{
                wrkMastExecuteHandler.start2(basJarMast);
            } catch (Exception e){
                log.error("硫化罐任务转历史档案失败!!!");
            }
        }
    }
 
}