16639036659
2024-04-07 c20b17fee68aa391bbbdaed34d1ee22f1ed21448
src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/DailyReportSchedule.java
@@ -4,6 +4,7 @@
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;
@@ -92,13 +93,12 @@
    @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);
@@ -235,6 +235,10 @@
        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))