自动化立体仓库 - WMS系统
#
zjj
2024-11-13 5eb83797abed1a572ca59cb2972171b18e3d46b2
src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -9,6 +9,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,10 @@
    @Autowired
    private ApiLogService apiLogService;
    @Value("${erp.enable}")
    private Boolean erpEnable;
    @Scheduled(cron = "0 0 1 * * ? ")
    public void clearApiLog(){
        try {
@@ -38,9 +43,10 @@
        }
    }
    @Scheduled(cron = "0/5 * * * * ? ")
//    @Scheduled(cron = "0/5 * * * * ? ")
    @Async("orderThreadPool")
    public void completeAndReport(){
        if (!erpEnable) return;
        String erpReport = Parameter.get().getErpReport();
        if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) {
            List<Order> orders = orderService.selectComplete();