1.冀北电网一张图bug修改
2.公共接口增加在线离线信息条件筛选
This commit is contained in:
@@ -34,4 +34,9 @@ public class DeviceType implements Serializable {
|
|||||||
* 数据类型(0:暂态系统;1:稳态系统;2:两个系统)
|
* 数据类型(0:暂态系统;1:稳态系统;2:两个系统)
|
||||||
*/
|
*/
|
||||||
private List<Integer> dataType ;
|
private List<Integer> dataType ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯状态(0:中断;1:正常)
|
||||||
|
*/
|
||||||
|
private List<Integer> comFlag ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,12 @@ public class DeviceInfoParam implements Serializable {
|
|||||||
@ApiModelProperty("监测点等级")
|
@ApiModelProperty("监测点等级")
|
||||||
private String lineGrade;
|
private String lineGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯状态(0:中断;1:正常)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("通讯状态")
|
||||||
|
@Range(min = 0, max = 2, message = "通讯状态" + ValidMessage.PARAM_FORMAT_ERROR)
|
||||||
|
private Integer comFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认全部监测点
|
* 默认全部监测点
|
||||||
|
|||||||
@@ -324,6 +324,12 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="deviceType.comFlag!=null and deviceType.comFlag.size()!=0">
|
||||||
|
AND t2.Com_Flag in
|
||||||
|
<foreach collection="deviceType.comFlag" open="(" close=")" item="item" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="manufacturer!=null and manufacturer.size()!=0">
|
<if test="manufacturer!=null and manufacturer.size()!=0">
|
||||||
AND t2.manufacturer in
|
AND t2.manufacturer in
|
||||||
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
@@ -319,6 +320,9 @@ public class GeneralDeviceService {
|
|||||||
} else {
|
} else {
|
||||||
deviceType.setRunFlag(runFlag);
|
deviceType.setRunFlag(runFlag);
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isNotNull(deviceInfoParam.getComFlag())){
|
||||||
|
deviceType.setComFlag(Arrays.asList(deviceInfoParam.getComFlag()));
|
||||||
|
}
|
||||||
filterDataType(deviceType, deviceInfoParam.getServerName());
|
filterDataType(deviceType, deviceInfoParam.getServerName());
|
||||||
|
|
||||||
// 初始化部门筛选条件
|
// 初始化部门筛选条件
|
||||||
|
|||||||
@@ -398,12 +398,12 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
long count90 = list.stream()
|
long count90 = list.stream()
|
||||||
.filter(x -> ObjectUtil.isNotNull(x.getSeverity()))
|
.filter(x -> ObjectUtil.isNotNull(x.getSeverity()))
|
||||||
.filter(x -> gwLineAllIds.contains(x.getMeasurementPointId()))
|
.filter(x -> gwLineAllIds.contains(x.getMeasurementPointId()))
|
||||||
.filter(x -> 0.9 < x.getFeatureAmplitude())
|
.filter(x -> 0.9 > x.getFeatureAmplitude())
|
||||||
.map(RmpEventDetailPO::getFeatureAmplitude).count();
|
.map(RmpEventDetailPO::getFeatureAmplitude).count();
|
||||||
long count50 = list.stream()
|
long count50 = list.stream()
|
||||||
.filter(x -> ObjectUtil.isNotNull(x.getSeverity()))
|
.filter(x -> ObjectUtil.isNotNull(x.getSeverity()))
|
||||||
.filter(x -> gwLineAllIds.contains(x.getMeasurementPointId()))
|
.filter(x -> gwLineAllIds.contains(x.getMeasurementPointId()))
|
||||||
.filter(x -> 0.5 < x.getFeatureAmplitude())
|
.filter(x -> 0.5 > x.getFeatureAmplitude())
|
||||||
.map(RmpEventDetailPO::getFeatureAmplitude).count();
|
.map(RmpEventDetailPO::getFeatureAmplitude).count();
|
||||||
if(count90>0){
|
if(count90>0){
|
||||||
info.add(NumberUtil.round(count90*100.0/list.size(),2).doubleValue());
|
info.add(NumberUtil.round(count90*100.0/list.size(),2).doubleValue());
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.harmonic.pojo.vo;
|
package com.njcn.harmonic.pojo.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
@@ -9,51 +10,61 @@ public class RStatLimitTargetVO {
|
|||||||
/**
|
/**
|
||||||
* 监测点ID合格率的变电站/装置/母线/线路序号
|
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 频率偏差越限次数
|
* 频率偏差越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("频率偏差越限天数")
|
||||||
private Integer flickerAllTime = 0;
|
private Integer flickerAllTime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压偏差越限次数
|
* 电压偏差越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("电压偏差越限天数")
|
||||||
private Integer freqDevOvertime = 0;
|
private Integer freqDevOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压不平衡度越限次数
|
* 电压不平衡度越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("电压不平衡度越限天数")
|
||||||
private Integer voltageDevOvertime = 0;
|
private Integer voltageDevOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闪变越限次数
|
* 闪变越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("闪变越限天数")
|
||||||
private Integer ubalanceOvertime = 0;
|
private Integer ubalanceOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压谐波畸变率越限次数
|
* 电压谐波畸变率越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("电压谐波畸变率越限天数")
|
||||||
private Integer uaberranceOvertime = 0;
|
private Integer uaberranceOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负序电流限值次数
|
* 负序电流限值天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("负序电流限值天数")
|
||||||
private Integer iNegOvertime = 0;
|
private Integer iNegOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压谐波含有率越限次数
|
* 电压谐波含有率越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("电压谐波含有率越限天数")
|
||||||
private Integer uharmOvertime = 0;
|
private Integer uharmOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电流谐波幅值越限次数
|
* 电流谐波幅值越限天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("电流谐波幅值越限天数")
|
||||||
private Integer iharmOvertime = 0;
|
private Integer iharmOvertime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 间谐波电压限值次数
|
* 间谐波电压限值天数
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("间谐波电压限值天数")
|
||||||
private Integer inuharmOvertime = 0;
|
private Integer inuharmOvertime = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -150,9 +150,12 @@ public class RStatLimitServiceImpl implements RStatLimitService {
|
|||||||
List<GridDiagramVO.AreaData> info = new ArrayList<>();
|
List<GridDiagramVO.AreaData> info = new ArrayList<>();
|
||||||
GridDiagramVO.AreaData areaData ;
|
GridDiagramVO.AreaData areaData ;
|
||||||
//监测点总数
|
//监测点总数
|
||||||
List<GeneralDeviceDTO> data = generalDeviceInfoClient.getPracticalAllDeviceInfoAsDept(param).getData();
|
List<GeneralDeviceDTO> data = generalDeviceInfoClient.getPracticalRunDeviceInfo(param).getData();
|
||||||
//在线
|
//在线
|
||||||
|
param.setComFlag(1);
|
||||||
List<GeneralDeviceDTO> onData = generalDeviceInfoClient.getPracticalRunDeviceInfo(param).getData();
|
List<GeneralDeviceDTO> onData = generalDeviceInfoClient.getPracticalRunDeviceInfo(param).getData();
|
||||||
|
List<String> line = data.stream().flatMap(x -> x.getLineIndexes().stream()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
Map<String, GeneralDeviceDTO> onMap = onData.stream().collect(Collectors.toMap(GeneralDeviceDTO::getIndex, Function.identity()));
|
Map<String, GeneralDeviceDTO> onMap = onData.stream().collect(Collectors.toMap(GeneralDeviceDTO::getIndex, Function.identity()));
|
||||||
|
|
||||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
@@ -162,7 +165,6 @@ public class RStatLimitServiceImpl implements RStatLimitService {
|
|||||||
List<DeptGetSubStationDTO.Info> deptGetChildrenMoreDTOS = commTerminalGeneralClient.deptGetSubStationInfo(deptGetLineParam).getData();
|
List<DeptGetSubStationDTO.Info> deptGetChildrenMoreDTOS = commTerminalGeneralClient.deptGetSubStationInfo(deptGetLineParam).getData();
|
||||||
Map<String, DeptGetSubStationDTO.Info> deptLineMap = deptGetChildrenMoreDTOS.stream().collect(Collectors.toMap(DeptGetSubStationDTO.Info::getUnitId, Function.identity()));
|
Map<String, DeptGetSubStationDTO.Info> deptLineMap = deptGetChildrenMoreDTOS.stream().collect(Collectors.toMap(DeptGetSubStationDTO.Info::getUnitId, Function.identity()));
|
||||||
|
|
||||||
List<String> line = data.stream().flatMap(x -> x.getLineIndexes().stream()).distinct().collect(Collectors.toList());
|
|
||||||
StatSubstationBizBaseParam baseParam=new StatSubstationBizBaseParam();
|
StatSubstationBizBaseParam baseParam=new StatSubstationBizBaseParam();
|
||||||
baseParam.setIds(line);
|
baseParam.setIds(line);
|
||||||
baseParam.setStartTime(DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())).toString());
|
baseParam.setStartTime(DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())).toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user