DredgingSchedule.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //package com.shcd.scheduling;
  2. //
  3. //
  4. //import com.shcd.entity.dredging.DredgingImportRule;
  5. //import com.shcd.service.dredging.DredgingService;
  6. //import com.xxl.job.core.biz.model.ReturnT;
  7. //import com.xxl.job.core.handler.annotation.XxlJob;
  8. //import com.xxl.job.core.log.XxlJobLogger;
  9. //import groovy.util.logging.Slf4j;
  10. //import org.springframework.scheduling.annotation.Scheduled;
  11. //import org.springframework.stereotype.Component;
  12. //
  13. //import javax.annotation.Resource;
  14. //import java.util.List;
  15. //
  16. //@Component
  17. //@Slf4j
  18. //public class DredgingSchedule {
  19. // @Resource
  20. // private DredgingService dredgingService;
  21. // @XxlJob("Dredging")
  22. // //@Scheduled(cron = "0 0 1 * * ?")
  23. // public ReturnT<String> dredging(String param){
  24. // List<DredgingImportRule> dredgingImportRules = dredgingService.getAllProjectId();
  25. // if (dredgingImportRules != null && dredgingImportRules.size() > 0){
  26. // for (DredgingImportRule dredgingImportRule : dredgingImportRules) {
  27. // try {
  28. // dredgingService.importData(dredgingImportRule);
  29. // } catch (Exception e) {
  30. // e.printStackTrace();
  31. // XxlJobLogger.log(e.getMessage() + "疏浚数据导入失败");
  32. // return ReturnT.FAIL;
  33. // }
  34. // }
  35. // System.out.println("ok");
  36. // }
  37. // return ReturnT.SUCCESS;
  38. // }
  39. //
  40. // @XxlJob("DredgingCamera")
  41. // public ReturnT<String> dredgingCamera(){
  42. // List<DredgingImportRule> dredgingImportRules = dredgingService.getAllProjectId();
  43. // if (!dredgingImportRules.isEmpty()){
  44. // for (DredgingImportRule dredgingImportRule : dredgingImportRules) {
  45. // try {
  46. // dredgingService.updateShipCamera(dredgingImportRule.getProjectOverviewId());
  47. // }catch (Exception e){
  48. // e.printStackTrace();
  49. // XxlJobLogger.log("刷新船舶失败 : {}" , e.getMessage());
  50. // }
  51. // }
  52. // }
  53. // }
  54. //}