自动化立体仓库 - WMS系统
1
ZY
2025-04-27 1b5c0044b4178c7314781ac36f897b781de72064
src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -10,6 +10,7 @@
import com.zy.common.entity.Parameter;
import lombok.extern.slf4j.Slf4j;
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;
@@ -29,6 +30,9 @@
    private OrderService orderService;
    @Autowired
    private ApiLogService apiLogService;
    @Value("${erp.switch.ErpReportOld}")
    private boolean ErpReportOld;
    @Scheduled(cron = "0 0 1 * * ? ")
    public void clearApiLog() {
@@ -97,9 +101,12 @@
//        }
    }
    @Scheduled(cron = "0/5 * * * * ? ")
    @Scheduled(cron = "0/30 * * * * ? ")
    @Async("orderThreadPool")
    public void completeAndReportOrderReport() {
        if (!ErpReportOld){
            return;
        }
        String erpReport = Parameter.get().getErpReport();
        if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) {
            List<Order> orders = orderService.selectComplete();