| | |
| | | private HistoryAqiService historyAqiService; |
| | | @Autowired |
| | | private HistoryHourlyService historyHourlyService; |
| | | @Autowired |
| | | private HistoryMonthlyService historyMonthlyService; |
| | | |
| | | @GetMapping("insertHistoryDaily") |
| | | @ApiOperation(value = "天数据补录", notes = "天数据补录") |
| | |
| | | @GetMapping("insertHistoryFiveMinutely") |
| | | @ApiOperation(value = "5分钟数据", notes = "5分钟数据") |
| | | public ResultMessage insertHistoryFiveMinutely() { |
| | | String format = DateUtils.yyyy_MM_dd_HH_mm_EN; |
| | | historyFiveMinutelyService.insertHistoryFiveMinutely(); |
| | | String s ="2023-10-13 03:35"; |
| | | String s1 ="2023-10-13 03:40"; |
| | | Date start = DateUtils.getDate(s,format); |
| | | Date end = DateUtils.getDate(s1,format); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("dateInsertHistoryHourlyJKAvg") |
| | | @ApiOperation(value = "疾控中心小时数据", notes = "疾控中心小时数据") |
| | | public ResultMessage dateInsertHistoryHourlyJKAvg(String start,String end) { |
| | | Date ks = DateUtils.getDate(start,"yyyy-MM-dd HH:mm:ss"); |
| | | Date js = DateUtils.getDate("2024-01-23 13:00:00","yyyy-MM-dd HH:mm:ss"); |
| | | Date ends = DateUtils.getDate(end,"yyyy-MM-dd HH:mm:ss"); |
| | | while (DateUtils.isTimeBefor(js,ks)){ |
| | | String dateString = DateUtils.dateToDateString(ks); |
| | | String dateString1 = DateUtils.dateToDateString(ends); |
| | | // historyHourlyService.dateInsertHistoryHourlyJKAvg(start, end); |
| | | historyHourlyService.dateInsertHistoryHourlyJKAvg(dateString, dateString1); |
| | | ks = DateUtils.getDateAddHour(ks,1); |
| | | ends = DateUtils.getDateAddHour(ends,1); |
| | | } |
| | | // String format = DateUtils.yyyy_MM_dd_HH_mm_EN; |
| | | // String start ="2023-11-19 09:00" |
| | | // String end ="2023-11-19 10:00"; |
| | | // Date start1 = DateUtils.getDate(start,format); |
| | | // Date end1 = DateUtils.getDate(end,format); |
| | | |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | |
| | | |
| | | @GetMapping("insertHistoryAqi") |
| | | @ApiOperation(value = "过控制战补偿", notes = "过控制战补偿") |
| | | public ResultMessage insertHistoryAqi() { |
| | | historyAqiService.insertHistoryAqi(); |
| | | public ResultMessage insertHistoryAqi(String time) { |
| | | historyAqiService.insertHistoryAqi(time); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("insertHCHistoryAqi") |
| | | @ApiOperation(value = "海城省控", notes = "海城省控") |
| | | public ResultMessage insertHCHistoryAqi() { |
| | | historyAqiService.insertHCHistoryAqi(); |
| | | return new ResultMessage(); |
| | | } |
| | | @GetMapping("dateToChangShu") |
| | | @ApiOperation(value = "常熟小时数据", notes = "常熟小时数据") |
| | | public ResultMessage dateToChangShu() { |
| | |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("insertHistoryMonthly") |
| | | @ApiOperation(value = "月数据", notes = "月数据") |
| | | public ResultMessage insertHistoryMonthly() { |
| | | historyMonthlyService.insertHistoryMonthly(); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String host = "https://pair.market.alicloudapi.com"; |