Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -174,9 +174,9 @@ public class MonitorPointController extends BaseController {
|
|||||||
@PostMapping("/getPlot")
|
@PostMapping("/getPlot")
|
||||||
@ApiOperation("暂降事件点图")
|
@ApiOperation("暂降事件点图")
|
||||||
@ApiImplicitParam(name = "statisticsParam", value = "暂降事件点图参数", required = true)
|
@ApiImplicitParam(name = "statisticsParam", value = "暂降事件点图参数", required = true)
|
||||||
public HttpResult<List<EventDetail>> getPlot(@RequestBody @Validated StatisticsParam statisticsParam){
|
public HttpResult<VoltageToleranceCurveVO> getPlot(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||||
String methodDescribe = getMethodDescribe("getPlot");
|
String methodDescribe = getMethodDescribe("getPlot");
|
||||||
List<EventDetail> page = eventAnalysisService.getPlot(statisticsParam);
|
VoltageToleranceCurveVO page = eventAnalysisService.getPlot(statisticsParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public interface EventAnalysisService {
|
|||||||
* @param statisticsParam
|
* @param statisticsParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EventDetail> getPlot(StatisticsParam statisticsParam);
|
VoltageToleranceCurveVO getPlot(StatisticsParam statisticsParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*监测点暂降事件分析查询
|
*监测点暂降事件分析查询
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.event.service.majornetwork.Impl;
|
package com.njcn.event.service.majornetwork.Impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
@@ -1417,7 +1418,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
|||||||
* @author xxy
|
* @author xxy
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EventDetail> getPlot(StatisticsParam statisticsParam) {
|
public VoltageToleranceCurveVO getPlot(StatisticsParam statisticsParam) {
|
||||||
List<EventDetail> result = new ArrayList<>();
|
List<EventDetail> result = new ArrayList<>();
|
||||||
// QueryResult query = MonitorQuery(statisticsParam);
|
// QueryResult query = MonitorQuery(statisticsParam);
|
||||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||||
@@ -1476,8 +1477,37 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
|||||||
|
|
||||||
result.add(eventDetailNew);
|
result.add(eventDetailNew);
|
||||||
}
|
}
|
||||||
|
if (CollUtil.isEmpty(result)) {
|
||||||
|
return VoltageToleranceCurveVO.empty();
|
||||||
|
}
|
||||||
|
ArrayList<String> lineIds = new ArrayList<>();
|
||||||
|
lineIds.add(statisticsParam.getLineIndex());
|
||||||
|
List<AreaLineInfoVO> getBaseLineAreaInfo = lineFeignClient.getBaseLineAreaInfo(lineIds).getData();
|
||||||
|
if (CollUtil.isEmpty(getBaseLineAreaInfo)) {
|
||||||
|
return VoltageToleranceCurveVO.empty();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
Map<String, AreaLineInfoVO> areaLineInfoVOMap =
|
||||||
|
getBaseLineAreaInfo.parallelStream().collect(Collectors.toConcurrentMap(AreaLineInfoVO::getLineId,
|
||||||
|
Function.identity()));
|
||||||
|
|
||||||
|
List<VoltageToleranceCurveVO.VoltageToleranceCurveDataList> curveDataList = result.parallelStream()
|
||||||
|
.map(dto -> {
|
||||||
|
AreaLineInfoVO info = areaLineInfoVOMap.get(dto.getLineId());
|
||||||
|
|
||||||
|
VoltageToleranceCurveVO.VoltageToleranceCurveDataList voltageToleranceCurve = new VoltageToleranceCurveVO.VoltageToleranceCurveDataList();
|
||||||
|
voltageToleranceCurve.setLineId(dto.getLineId());
|
||||||
|
voltageToleranceCurve.setPersistTime(dto.getDuration());
|
||||||
|
voltageToleranceCurve.setEventValue(dto.getFeatureAmplitude());
|
||||||
|
voltageToleranceCurve.setTime(dto.getStartTime());
|
||||||
|
voltageToleranceCurve.setGdName(info.getGdName());
|
||||||
|
voltageToleranceCurve.setSubName(info.getSubName());
|
||||||
|
return voltageToleranceCurve;
|
||||||
|
})
|
||||||
|
//.sorted(VoltageToleranceCurveDataList.sortAscTime())
|
||||||
|
.collect(Collectors.toCollection(() -> Collections.synchronizedList(new ArrayList<>())));
|
||||||
|
|
||||||
|
return VoltageToleranceCurveVO.buildVO(result.size(), curveDataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -317,10 +317,14 @@ public enum DicDataEnum {
|
|||||||
*/
|
*/
|
||||||
STAR("星型接线","Trans_Business"),
|
STAR("星型接线","Trans_Business"),
|
||||||
STAR_TRIANGLE("星三角","Star_Triangle"),
|
STAR_TRIANGLE("星三角","Star_Triangle"),
|
||||||
OPEN_DELTA("开口三角","Open_Delta"),;
|
OPEN_DELTA("开口三角","Open_Delta"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置类型(治理)
|
||||||
|
*/
|
||||||
|
GATEWAY_DEV("网关","Gateway_Dev"),
|
||||||
|
CONNECT_DEV("直连设备","Connect_Dev"),
|
||||||
|
;
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ public enum DicDataTypeEnum {
|
|||||||
ASSESS_RESULT("评估结果","Assess_Result"),
|
ASSESS_RESULT("评估结果","Assess_Result"),
|
||||||
WORK_ORDER_TYPE("工单类型","Work_Order_Type"),
|
WORK_ORDER_TYPE("工单类型","Work_Order_Type"),
|
||||||
DEV_VOLTAGE_STAND("标准电压等级","Dev_Voltage_Stand"),
|
DEV_VOLTAGE_STAND("标准电压等级","Dev_Voltage_Stand"),
|
||||||
PRIMARY_TYPE("一级业务类型","Primary_Type");
|
PRIMARY_TYPE("一级业务类型","Primary_Type"),
|
||||||
|
DEV_CLASS("终端类型(治理)","Dev_Class")
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user