| | |
| | | package com.vci.ubcs.code.Scheduling; |
| | | package com.vci.ubcs.code.Scheduling; |
| | | |
| | | import com.vci.ubcs.code.service.ICodeDuckingSyncService; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | * 从dockingtask中取出来数据,推送出去的操作 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class DockingDataSyncScheduling { |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | // private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | @Resource |
| | | private ICodeDuckingSyncService codeDuckingSyncServiceI; |
| | |
| | | FINISH_INIT = "true"; |
| | | } |
| | | |
| | | //默认每分钟执行方法 |
| | | /** |
| | | * 默认每分钟执行方法 |
| | | */ |
| | | @Scheduled(cron = "${dataSyncPush.cronTime:0 0/10 * * * ?}") |
| | | public void scheduled() { |
| | | log.info("执行主数据集成数据推送 start"); |
| | | if(DATA_SYNC_PUSH_ISSTARE && BooleanEnum.TRUE.getValue().equalsIgnoreCase(FINISH_INIT)) { |
| | | codeDuckingSyncServiceI.DockingDataSyncScheduing(); |
| | | SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss."); |
| | | String time = formatter.format(new Date()); |
| | | String outinfo = "============在 "+time+" 执行了主数据集成数据推送"; |
| | | logger.info(outinfo); |
| | | String outinfo = time+"============ 执行了主数据集成数据推送"; |
| | | log.info(outinfo); |
| | | } |
| | | log.info("执行主数据集成数据推送 end: "+ "开关是否开启:" +DATA_SYNC_PUSH_ISSTARE); |
| | | } |
| | | |
| | | } |