自动化立体仓库 - WMS系统
13
zhang
2025-05-26 b9d80dfdb1cef36c9edb8bf6b2fdf9e6e1708d2b
src/main/java/com/zy/nc/task/BaseDataTask.java
@@ -1,7 +1,7 @@
package com.zy.nc.task;
import com.zy.asrs.task.core.ReturnT;
import com.zy.nc.task.handler.PlanOrderHandler;
import com.zy.nc.task.handler.BaseDataHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
@@ -12,22 +12,60 @@
public class BaseDataTask {
    @Autowired
    private PlanOrderHandler planOrderHandler;
    private BaseDataHandler baseDataHandler;
    @Scheduled(cron = "0/3 * * * * ? ")
    public void execute1() {
        ReturnT<String> returnT = planOrderHandler.start1();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
//        ReturnT<String> returnT = baseDataHandler.start1();
//        if (!returnT.isSuccess()) {
//            log.error(returnT.getMsg());
//        }
    }
    /**
     * 人员数据同步
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    public void execute2() {
        ReturnT<String> returnT = planOrderHandler.start2();
    public void start8() {
        ReturnT<String> returnT = baseDataHandler.start8();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
    /**
     * 物料分类数据同步
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    public void start9() {
        ReturnT<String> returnT = baseDataHandler.start9();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
    /**
     * 物料基础数据同步
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    public void execute13() {
        ReturnT<String> returnT = baseDataHandler.start13();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
    /**
     * 仓库基础数据同步
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    public void execute6() {
        ReturnT<String> returnT = baseDataHandler.start6();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
}