自动化立体仓库 - WMS系统
#
18516761980
2021-09-14 35ce7aaef10e30006bcef381d19302c0928c1194
src/main/java/com/zy/ints/task/WaitMatchkLogScheduler.java
@@ -7,6 +7,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -25,9 +26,16 @@
    @Autowired
    private WaitMatchkService waitMatchkService;
    /**
     * ERP接口是否启用
     */
    @Value("${erp.enabled}")
    private Boolean erpEnabled;
    @Scheduled(cron = "0/5 * * * * ? ")
    private void execute(){
        List<WaitMatchk> waitMatchks = null;
        if(!erpEnabled) return;
        List<WaitMatchk> waitMatchks = waitMatchkService.selectWaitMatchkBySts();
        for (WaitMatchk waitMatchk : waitMatchks) {
            ReturnT<String> result = waitMatchkLogHandler.start(waitMatchk);
            if (!result.isSuccess()) {