From 74bf71f3ad49ed5fe67e942c88b68a9354b87972 Mon Sep 17 00:00:00 2001 From: swb <jpy123456> Date: Fri, 05 Jul 2024 08:40:19 +0800 Subject: [PATCH] fix:补充提交 --- screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java | 122 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 118 insertions(+), 4 deletions(-) diff --git a/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java b/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java index 8a272b3..c4a6323 100644 --- a/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java +++ b/screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java @@ -5,17 +5,27 @@ import com.moral.api.service.HistoryDailyService; import com.moral.api.service.HistoryFiveMinutelyService; +import com.moral.api.service.HistoryHourlyService; import com.moral.api.service.HistoryMonthlyService; +import com.moral.api.service.HistorySecondCruiserService; import com.moral.api.service.HistoryWeeklyService; +import com.moral.api.service.ManageCoordinateDetailService; +import com.moral.api.service.impl.HistorySecondCruiserServiceImpl; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.handler.annotation.XxlJob; + +import javax.xml.crypto.Data; +import java.util.Date; @Component public class HistoryTableInsertTask { @Autowired private HistoryFiveMinutelyService historyFiveMinutelyService; + + @Autowired + private HistoryHourlyService historyHourlyService; @Autowired private HistoryDailyService historyDailyService; @@ -26,6 +36,14 @@ @Autowired private HistoryMonthlyService historyMonthlyService; + + @Autowired + private ManageCoordinateDetailService manageCoordinateDetailService; + + + @Autowired + private HistorySecondCruiserService historySecondCruiserService; + //5������������������ @XxlJob("insertHistoryFiveMinutely") public ReturnT insertHistoryFiveMinutely() { @@ -33,7 +51,7 @@ historyFiveMinutelyService.insertHistoryFiveMinutely(); } catch (Exception e) { XxlJobHelper.log(e.getMessage()); - return ReturnT.FAIL; + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); } return ReturnT.SUCCESS; } @@ -42,7 +60,8 @@ @XxlJob("insertHistoryDaily") public ReturnT insertHistoryDaily() { try { - historyDailyService.insertHistoryDaily(); + Date now = new Date(); + historyDailyService.insertHistoryDaily(null); } catch (Exception e) { XxlJobHelper.log(e.getMessage()); return ReturnT.FAIL; @@ -57,7 +76,7 @@ historyWeeklyService.insertHistoryWeekly(); } catch (Exception e) { XxlJobHelper.log(e.getMessage()); - return ReturnT.FAIL; + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); } return ReturnT.SUCCESS; } @@ -69,8 +88,103 @@ historyMonthlyService.insertHistoryMonthly(); } catch (Exception e) { XxlJobHelper.log(e.getMessage()); - return ReturnT.FAIL; + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); } return ReturnT.SUCCESS; } + + //������������������������ + @XxlJob("historyHourlySupplement") + public ReturnT historyHourlySupplement() { + try { + historyHourlyService.insertHistoryHourly(); + } catch (Exception e) { + XxlJobHelper.log(e.getMessage()); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + } + + //��������������������������������������������������������������� + @XxlJob("insertHistoryHourlyComplete") + public ReturnT insertHistoryHourlyComplete(){ + try { + historyHourlyService.insertHistoryHourlyComplete(); + } catch (Exception e) { + e.printStackTrace(); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + } + + @XxlJob("dateToChangShu") + public ReturnT dateToChangShu(){ + try { + historyHourlyService.dateToChangShu(null); + } catch (Exception e) { + e.printStackTrace(); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + } + + //������������������������ + @XxlJob("dateInsertHistoryHourlyAvg") + public ReturnT dateInsertHistoryHourlyAvg(){ + try { + historyHourlyService.dateInsertHistoryHourlyAvg(); + } catch (Exception e) { + e.printStackTrace(); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + } + + + //������������������������������ + @XxlJob("dateInsertHistoryHourlyJKAvg") + public ReturnT dateInsertHistoryHourlyJKAvg(){ + try { + historyHourlyService.dateInsertHistoryHourlyJKAvg(null,null); + } catch (Exception e) { + e.printStackTrace(); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + } + + + /** + * ������������������ + * @return + */ + @XxlJob("manageCoordinateDetail") + public ReturnT manageCoordinateDetail(){ + try { + manageCoordinateDetailService.insertCoordinateDetail(null,null); + } catch (Exception e) { + XxlJobHelper.log(e.getMessage()); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + + } + + + /** + * ��������������������� + * @return + */ + @XxlJob("secondCruiserSort") + public ReturnT secondCruiserSort(){ + try { + historySecondCruiserService.sort(null,null); + } catch (Exception e) { + XxlJobHelper.log(e.getMessage()); + return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); + } + return ReturnT.SUCCESS; + + } + } -- Gitblit v1.8.0