package com.zy.nc.task; import com.zy.asrs.task.core.ReturnT; 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; import org.springframework.stereotype.Component; @Slf4j @Component public class BaseDataTask { @Autowired private BaseDataHandler baseDataHandler; @Scheduled(cron = "0/3 * * * * ? ") public void execute1() { // ReturnT returnT = baseDataHandler.start1(); // if (!returnT.isSuccess()) { // log.error(returnT.getMsg()); // } } /** * 人员数据同步 */ @Scheduled(cron = "0/3 * * * * ? ") public void start8() { ReturnT returnT = baseDataHandler.start8(); if (!returnT.isSuccess()) { log.error(returnT.getMsg()); } } /** * 物料分类数据同步 */ @Scheduled(cron = "0/3 * * * * ? ") public void start9() { ReturnT returnT = baseDataHandler.start9(); if (!returnT.isSuccess()) { log.error(returnT.getMsg()); } } /** * 物料基础数据同步 */ @Scheduled(cron = "0/3 * * * * ? ") public void execute13() { ReturnT returnT = baseDataHandler.start13(); if (!returnT.isSuccess()) { log.error(returnT.getMsg()); } } /** * 仓库基础数据同步 */ @Scheduled(cron = "0/3 * * * * ? ") public void execute6() { ReturnT returnT = baseDataHandler.start6(); if (!returnT.isSuccess()) { log.error(returnT.getMsg()); } } }