package com.iailab.module.job.task; import com.iailab.module.prod.service.PrdCurrentPerformanceService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Resource; import org.springframework.stereotype.Component; /** * 同步当前产量 * * @author PanZhibao * @Description * @createTime 2024年05月28日 */ @Component("syncPrdPerformanceTask") public class SyncPrdPerformanceTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private PrdCurrentPerformanceService prdCurrentPerformanceService; @Override public void run(String params) { try { logger.info("SyncPrdPerformanceTask 开始"); prdCurrentPerformanceService.syncData(); logger.info("SyncPrdPerformanceTask 完成"); } catch (Exception ex) { logger.info("SyncPrdPerformanceTask 异常"); ex.printStackTrace(); } } }