自动化立体仓库 - WCS系统
yxFwq
2024-08-12 a395c37ac600ec6c73fed890ba94ede9fec5cc68
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
package com.zy.asrs.task;
 
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.JarBurialEscalationHandler;
import com.zy.asrs.task.handler.ScaleEscalationHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
/**
 * Created by Monkey D. Luffy on 2024.07.20
 * 亳州煜星..............以下.............亳州煜星.............上传开式冷却信号
 */
@Slf4j
@Component
public class JarBurialEscalationScheduler {
 
    @Autowired
    private JarBurialEscalationHandler jarBurialEscalationHandler;
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){//上传开式冷却信号
        int[] jarList =new int[]{1,2,3,4,5,6};
        for (int jarNo : jarList){
            try{
                ReturnT<String> result = jarBurialEscalationHandler.start(jarNo,10,11);
                if (result.getCode()==200){
                    break;
                }
            }catch (Exception e){
                log.error("冷却池:"+jarNo+"==》上传开式冷却信号处理失败,异常信息:"+e);
            }
        }
    }
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute2(){//上传开式冷却信号
        int[] jarList =new int[]{1,2,3,4,5,6};
        for (int jarNo : jarList){
            try{
                ReturnT<String> result = jarBurialEscalationHandler.start(jarNo,11,12);
                if (result.getCode()==200){
                    break;
                }
            }catch (Exception e){
                log.error("冷却池:"+jarNo+"==》上传开式冷却信号处理失败,异常信息:"+e);
            }
        }
    }
 
}