123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- //package com.shcd.scheduling;
- //
- //
- //import com.shcd.entity.dredging.DredgingImportRule;
- //import com.shcd.service.dredging.DredgingService;
- //import com.xxl.job.core.biz.model.ReturnT;
- //import com.xxl.job.core.handler.annotation.XxlJob;
- //import com.xxl.job.core.log.XxlJobLogger;
- //import groovy.util.logging.Slf4j;
- //import org.springframework.scheduling.annotation.Scheduled;
- //import org.springframework.stereotype.Component;
- //
- //import javax.annotation.Resource;
- //import java.util.List;
- //
- //@Component
- //@Slf4j
- //public class DredgingSchedule {
- // @Resource
- // private DredgingService dredgingService;
- // @XxlJob("Dredging")
- // //@Scheduled(cron = "0 0 1 * * ?")
- // public ReturnT<String> dredging(String param){
- // List<DredgingImportRule> dredgingImportRules = dredgingService.getAllProjectId();
- // if (dredgingImportRules != null && dredgingImportRules.size() > 0){
- // for (DredgingImportRule dredgingImportRule : dredgingImportRules) {
- // try {
- // dredgingService.importData(dredgingImportRule);
- // } catch (Exception e) {
- // e.printStackTrace();
- // XxlJobLogger.log(e.getMessage() + "疏浚数据导入失败");
- // return ReturnT.FAIL;
- // }
- // }
- // System.out.println("ok");
- // }
- // return ReturnT.SUCCESS;
- // }
- //
- // @XxlJob("DredgingCamera")
- // public ReturnT<String> dredgingCamera(){
- // List<DredgingImportRule> dredgingImportRules = dredgingService.getAllProjectId();
- // if (!dredgingImportRules.isEmpty()){
- // for (DredgingImportRule dredgingImportRule : dredgingImportRules) {
- // try {
- // dredgingService.updateShipCamera(dredgingImportRule.getProjectOverviewId());
- // }catch (Exception e){
- // e.printStackTrace();
- // XxlJobLogger.log("刷新船舶失败 : {}" , e.getMessage());
- // }
- // }
- // }
- // }
- //}
|