自动化立体仓库 - WMS系统
zhangc
2024-12-12 5dc8a9f9aba3310fd21cad9509635bb7ec2f007f
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
package com.zy.asrs.task;
 
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.ErrorStockHandler;
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;
 
/**
 * Created by vincent on 2020/7/7
 */
@Component
//@RestController
public class ErrorStockScheduler {
 
    private static final Logger log = LoggerFactory.getLogger(ErrorStockScheduler.class);
 
    @Autowired
    private ErrorStockHandler errorStockHandler;
 
//    @Scheduled(cron = "0/60 * * * * ? ")
    private void execute(){
        ReturnT<String> returnT = errorStockHandler.start();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
 
//    @Autowired
//    private BasErrLogService basErrLogService;
//    @Autowired
//    private BasCrnErrorMapper basCrnErrorMapper;
//
//    @GetMapping("/adsadwqwqewq")
//    private void ErrorCovert(){
//        List<BasErrLog> basErrLogs = basErrLogService.selectList(new EntityWrapper<BasErrLog>());
//        for (BasErrLog basErrLog : basErrLogs) {
//            if (!Cools.isEmpty(basErrLog.getErrCode())) {
//                BasCrnError error = basCrnErrorMapper.selectById(basErrLog.getErrCode());
//                basErrLog.setError(error==null?"未知异常":error.getErrName());
//                basErrLogService.updateById(basErrLog);
//            }
//        }
//    }
 
}