| | |
| | | import com.gkhy.fourierSpecialGasMonitor.Application; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.enums.ForeignResultCode; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.enums.ResultCode; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.enums.SystemCacheKeyEnum; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.exception.BusinessException; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.exception.DataReceiveException; |
| | | import com.gkhy.fourierSpecialGasMonitor.config.file.ReportFilePathConfig; |
| | |
| | | @Autowired |
| | | private MonitorDailyReportService monitorDailyReportService; |
| | | |
| | | //@Scheduled(cron = "0 0 2 * * ?") //每天两点执行一次 |
| | | @Scheduled(cron = "0/30 * * * * ?") |
| | | @Scheduled(cron = "0 0 2 * * ?") //每天两点执行一次 |
| | | @Async(value = "SocketTaskExecutor") |
| | | public void generateDailyReport() { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | String startTime = now.format(execformatter); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket("gas_category_cache_info"); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket(SystemCacheKeyEnum.KEY_GAS_CATEGORY.getKey()); |
| | | List<GasCategory> gasCategories = bucket.get(); |
| | | serialNumber = 4; |
| | | logger.info("【##】开始生成日报 ,时间:"+startTime); |
| | |
| | | logger.info("【##】日报生成成功!!! ,时间:"+endTime+",所耗时间: "+execTime+"s"); |
| | | } |
| | | |
| | | /** |
| | | * @decription 画柱形图 |
| | | * @author Mr.huang |
| | | */ |
| | | public void drawBarChart(List<GasFlux> gasFluxes,String fileurl,String series,String molecularFormula,Integer i,Integer j) { |
| | | List<String> collect = gasFluxes.stream() |
| | | .map(gasFlux -> gasFlux.getTime().format(lineChartXDataDisplay)) |