| | |
| | | |
| | | 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.HistoryWeeklyService; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | |
| | | |
| | | @Autowired |
| | | private HistoryFiveMinutelyService historyFiveMinutelyService; |
| | | |
| | | @Autowired |
| | | private HistoryHourlyService historyHourlyService; |
| | | |
| | | @Autowired |
| | | private HistoryDailyService historyDailyService; |
| | |
| | | historyFiveMinutelyService.insertHistoryFiveMinutely(); |
| | | } catch (Exception e) { |
| | | XxlJobHelper.log(e.getMessage()); |
| | | return ReturnT.FAIL; |
| | | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | |
| | | historyWeeklyService.insertHistoryWeekly(); |
| | | } catch (Exception e) { |
| | | XxlJobHelper.log(e.getMessage()); |
| | | return ReturnT.FAIL; |
| | | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | |
| | | 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; |
| | | } |