自动化立体仓库 - WMS系统
zhangc
2025-01-07 f48878cdae5652be9e8f1145eda84d2ca9ca0544
src/main/java/com/zy/asrs/task/ReportDataScheduler.java
@@ -15,7 +15,6 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -57,8 +56,11 @@
    @Value("${mes.getTokenPath}")
    private String getTokenPath;
    @Value("${mes.stock}")
    private String stock;
    @Scheduled(fixedDelay = 5000)
    @Scheduled(fixedDelay = 30000)
    public void execute() {
        log.info("定时任务开始执行");
        if (!flag) {
@@ -118,4 +120,15 @@
        }
    }
    @Scheduled(fixedDelay = 1000 * 60 * 30)
    public void executeStock() {
        log.info("Stock定时任务开始执行");
//        if (!flag) {
//            return;
//        }
        Map<String, Object> mesTokenInfo = getMesTokenInfo();
        reportDataHandler.stock(mesTokenInfo);
        log.info("Stock定时任务结束执行");
    }
}