暂态报告:监测点报告和区域报告下载速度优化

This commit is contained in:
wurui
2023-02-17 11:22:50 +08:00
parent 3a602068a4
commit 3b591338a6
7 changed files with 1899 additions and 3289 deletions

View File

@@ -53,4 +53,23 @@ public class InfluxDBCommUtils {
} }
return lineIdsStr; return lineIdsStr;
} }
/**
* 组装为influxdb监测点参数
*
* @param devIds 设备ids参数
* @param name 列明
* @return StringBuilder
*/
public static StringBuilder assToInfluxParamAndName(@NotEmpty List<String> devIds,String name){
StringBuilder lineIdsStr = new StringBuilder("(");
for (int i = 0; i < devIds.size(); i++) {
if (devIds.size() - i != 1) {
lineIdsStr.append(name+" ='").append(devIds.get(i)).append("' or ");
} else {
lineIdsStr.append(name+" ='").append(devIds.get(i)).append("') ");
}
}
return lineIdsStr;
}
} }

View File

@@ -24,11 +24,9 @@ public class AreaTableParam implements Serializable {
@ApiModelProperty(name = "StringBuilder", value = "监测点拼接的字符串") @ApiModelProperty(name = "StringBuilder", value = "监测点拼接的字符串")
private StringBuilder stringBuilder; private StringBuilder stringBuilder;
@ApiModelProperty(name = "startTime", value = "开始时间") @ApiModelProperty(name = "startTime", value = "开始时间")
private String startTime; private String startTime;
@ApiModelProperty(name = "endTime", value = "结束时间") @ApiModelProperty(name = "endTime", value = "结束时间")
private String endTime; private String endTime;

View File

@@ -176,6 +176,7 @@ public class ReportController extends BaseController {
/** /**
* 获取事件报告 * 获取事件报告
*
* @author zbj * @author zbj
* @date 2022/7/29 * @date 2022/7/29
*/ */
@@ -191,6 +192,7 @@ public class ReportController extends BaseController {
/** /**
* 获取区域报告 * 获取区域报告
*
* @author zbj * @author zbj
* @date 2022/8/4 * @date 2022/8/4
*/ */
@@ -204,5 +206,4 @@ public class ReportController extends BaseController {
} }
} }

View File

@@ -0,0 +1,72 @@
package com.njcn.event.service.majornetwork;
import com.njcn.event.pojo.param.StatisticsParam;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.vo.*;
import com.njcn.system.pojo.po.DictData;
import java.text.ParseException;
import java.util.List;
/**
* <监测点报表>
*
* @author wr
* @createTime: 2023-02-10
*/
public interface EventReportService {
/**
*获取Disdip表格监测点报表专用
* @param info influxdb查询结果pqs_eventdetail表
* @return
*/
List<DISDIPVO> eventDisdip(List<EventDetail> info);
/**
* 获取IEC411数据
* @param info influxdb查询结果pqs_eventdetail表
* @return
*/
List<IEC411VO> IEC411(List<EventDetail> info);
/**
* 获取IEC28数据
* @param info influxdb查询结果pqs_eventdetail表
* @return
*/
List<IEC28VO> IEC28(List<EventDetail> info);
/**
*暂降幅值概率分布
* @param info2 influxdb查询结果pqs_eventdetail表
* @return
*/
ProbabilityVO getProbabilityDistribution(List<EventDetail> info2);
/**
* 获取时间列表(月份统计)
* @param info influxdb查询结果pqs_eventdetail表
* @return
*/
List<TimeVO> getReasonTypeTime(StatisticsParam statisticsParam,List<EventDetail> info) throws ParseException;
/**
* 获取点状表格数据2.1
* @param info 结果集
* @param reasonData 暂降原因
* @param typeData 暂降类型
* @return
*/
List<EventDetail> getPlot(List<EventDetail> info, List<DictData> reasonData, List<DictData> typeData);
/**
* 获取详细数据对象
* @param info
* @param reasonData
* @param typeData
* @return
*/
StatisticVO getStatistic(List<EventDetail> info,List<DictData> reasonData,List<DictData>typeData);
}

View File

@@ -3,14 +3,11 @@ package com.njcn.event.service.majornetwork;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.pojo.param.DeviceInfoParam; import com.njcn.device.pq.pojo.param.DeviceInfoParam;
import com.njcn.event.pojo.param.*; import com.njcn.event.pojo.param.*;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.vo.*; import com.njcn.event.pojo.vo.*;
import freemarker.template.TemplateException; import freemarker.template.TemplateException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.influxdb.dto.QueryResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.text.ParseException; import java.text.ParseException;
import java.util.List; import java.util.List;
@@ -44,6 +41,7 @@ public interface ReportService {
/** /**
* 获取事件报告 * 获取事件报告
*
* @author zbj * @author zbj
* @date 2022/7/29 * @date 2022/7/29
*/ */
@@ -51,11 +49,11 @@ public interface ReportService {
/** /**
* 获取区域报告 * 获取区域报告
*
* @author zbj * @author zbj
* @date 2022/8/4 * @date 2022/8/4
*/ */
void getAreaReport(AreaReportParam areaReportParam, HttpServletResponse response) throws Exception; void getAreaReport(AreaReportParam areaReportParam, HttpServletResponse response) throws Exception;
} }