代码调整
This commit is contained in:
@@ -242,9 +242,9 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
//报表日期
|
||||
.eq(ExcelRpt::getDataDate, reportSearchParam.getStartTime());
|
||||
try {
|
||||
ExcelRpt excelRpts = excelRptMapper.selectOne(lambdaQuery);
|
||||
if (Objects.nonNull(excelRpts)) {
|
||||
fileStorageUtil.downloadStream(response, excelRpts.getContent());
|
||||
List<ExcelRpt> excelRpts = excelRptMapper.selectList(lambdaQuery);
|
||||
if (CollUtil.isNotEmpty(excelRpts)) {
|
||||
fileStorageUtil.downloadStream(response, excelRpts.get(0).getContent());
|
||||
} else {
|
||||
fileStorageUtil.downloadStream(response, analyzeReport(reportSearchParam, excelRptTemp));
|
||||
}
|
||||
@@ -467,7 +467,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
InputStream reportStream = IoUtil.toStream(jsonArray.toString(), CharsetUtil.UTF_8);
|
||||
String newContent = fileStorageUtil.uploadStream(reportStream, OssPath.HARMONIC_EXCEL_REPORT, FileUtil.generateFileName("json"));
|
||||
|
||||
//存入报表库
|
||||
//入库前判断是否有了,有了就更新
|
||||
ExcelRpt excelRpt = new ExcelRpt();
|
||||
excelRpt.setName(excelRptTemp.getName());
|
||||
excelRpt.setLineId(reportSearchParam.getLineId());
|
||||
@@ -524,6 +524,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
.append(InfluxDBSqlConstant.QM);
|
||||
}
|
||||
|
||||
|
||||
//data_flicker、data_fluc、data_plt 无 value_type
|
||||
if (!InfluxDBTableConstant.DATA_FLICKER.equals(data.getClassId()) && !InfluxDBTableConstant.DATA_FLUC.equals(data.getClassId()) && !InfluxDBTableConstant.DATA_PLT.equals(data.getClassId())) {
|
||||
sql.append(InfluxDBSqlConstant.AND)
|
||||
@@ -541,6 +542,11 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
.append(InfluxDBSqlConstant.TIME).append(InfluxDBSqlConstant.LT).append(InfluxDBSqlConstant.QM).append(reportSearchParam.getEndTime()).append(InfluxDBSqlConstant.END_TIME).append(InfluxDBSqlConstant.QM);
|
||||
|
||||
sql.append(InfluxDBSqlConstant.TZ);
|
||||
|
||||
if(data.getClassId().equals(InfluxDBTableConstant.DATA_PLT)){
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
//根据不同的库表赋值
|
||||
QueryResult queryResult = influxDbUtils.query(String.valueOf(sql));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user