自动化立体仓库 - WCS系统
#
yxFwq
2024-11-28 263de79f85d11630bf24364de499218f1ff8ff21
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
package com.zy.asrs.task;
 
import com.zy.asrs.domain.enums.LedErrorAreaType;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.StaEscalationHandler;
import com.zy.asrs.utils.LedErrorThreadUtil;
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.11
 * 亳州煜星..............以下.............亳州煜星.............2楼翻转倒料信息上传处理失败
 */
@Slf4j
@Component
public class StaEscalationScheduler {
 
    @Autowired
    private StaEscalationHandler staEscalationHandler;
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){//2楼翻转倒料信息上传
        int[] staNos =new int[]{126,131,310,312};
        for (int staNo : staNos){
            try{
                ReturnT<String> result = staEscalationHandler.start(staNo);
                if (result.getCode()==200){
                    break;
                }
            }catch (Exception e){
                LedErrorThreadUtil.ledErrorThread("2楼翻转倒料上报erp失败!站点号:"+staNo,4, LedErrorAreaType.ONE_OTHER.getDesc());
                log.error("站点"+staNo+"2楼翻转倒料信息上传处理失败,异常信息:"+e);
            }
        }
    }
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void executeOverturn(){//2楼翻转倒料后回库标记清除
        int[] staNos =new int[]{126,131,310,312};
        for (int staNo : staNos){
            try{
                ReturnT<String> result = staEscalationHandler.start2(staNo);
                if (result.getCode()==200){
                    break;
                }
            }catch (Exception e){
                LedErrorThreadUtil.ledErrorThread("2楼翻转倒料后回库标记清除失败!站点号:"+staNo,4, LedErrorAreaType.ONE_OTHER.getDesc());
                log.error("站点"+staNo+"2楼翻转倒料后回库标记清除失败,异常信息:"+e);
            }
        }
    }
 
}