自动化立体仓库 - WMS系统
#
18516761980
2021-09-18 a7b476eaa50abb7cdebf691cc232c26926ee1328
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()) {