Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -375,7 +375,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:获取influxDB -> data_v -> 电压偏差 -> 最大值 && 最小值
|
* 功能描述:获取influxDB -> data_v -> 电压偏差 -> 最大值
|
||||||
*
|
*
|
||||||
* @param lineIndex 监测点lineIndex
|
* @param lineIndex 监测点lineIndex
|
||||||
* @param startTime 开始时间
|
* @param startTime 开始时间
|
||||||
@@ -387,7 +387,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
StringBuilder stringBuilder = new StringBuilder ( );
|
StringBuilder stringBuilder = new StringBuilder ( );
|
||||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").
|
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").
|
||||||
append (startTime).append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
append (startTime).append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||||
append ("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and (value_type = 'MIN' or value_type = 'MAX') and quality_flag = '0' ").
|
append ("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'MAX' and quality_flag = '0' ").
|
||||||
append (InfluxDBPublicParam.TIME_ZONE);
|
append (InfluxDBPublicParam.TIME_ZONE);
|
||||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
||||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||||
@@ -738,22 +738,20 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//电压上偏差、电压下偏差
|
//电压上偏差、电压下偏差(根据vl_dev的正负判断是用哪个值判断越限)
|
||||||
if (!CollectionUtils.isEmpty (dataVPODevList)) {
|
if (!CollectionUtils.isEmpty (dataVPODevList)) {
|
||||||
Map<String, List<DataVPO>> devMap = dataVPODevList.stream ( ).collect (Collectors.groupingBy (DataVPO::getValueType));
|
for (DataVPO item : dataVPODevList) {
|
||||||
List<DataVPO> maxList = devMap.get ("MAX");
|
if (item.getVlDev() >= 0){
|
||||||
for (DataVPO item : maxList) {
|
if (item.getVlDev() > overlimit.getVoltageDev()){
|
||||||
if (item.getVuDev ( ) > overlimit.getVoltageDev ( )) {
|
|
||||||
uDev++;
|
uDev++;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
List<DataVPO> minList = devMap.get ("MIN");
|
if (Math.abs(item.getVlDev()) > Math.abs(overlimit.getUvoltageDev())){
|
||||||
for (DataVPO item : minList) {
|
|
||||||
if (item.getVlDev ( ) < overlimit.getUvoltageDev ( )) {
|
|
||||||
uDev++;
|
uDev++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//长时间闪变
|
//长时间闪变
|
||||||
if (!CollectionUtils.isEmpty (dataPltPOList)) {
|
if (!CollectionUtils.isEmpty (dataPltPOList)) {
|
||||||
for (DataPltPO item : dataPltPOList) {
|
for (DataPltPO item : dataPltPOList) {
|
||||||
@@ -1149,11 +1147,8 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
//电压上偏差、电压下偏差
|
//电压上偏差、电压下偏差
|
||||||
for (Instant time:map8.keySet()) {
|
for (Instant time:map8.keySet()) {
|
||||||
List<DataVPO> list = map8.get(time);
|
List<DataVPO> list = map8.get(time);
|
||||||
Map<String,List<DataVPO>> devMap = list.stream().collect(Collectors.groupingBy(DataVPO::getValueType));
|
List<DataVPO> l1 = list.stream().filter(s->s.getVlDev()>=0&&s.getVlDev()>overlimit.getVoltageDev()).collect(Collectors.toList());
|
||||||
List<DataVPO> maxList = devMap.get("MAX");
|
List<DataVPO> l2 = list.stream().filter(s->s.getVlDev()<0&&Math.abs(s.getVlDev())>Math.abs(overlimit.getUvoltageDev())).collect(Collectors.toList());
|
||||||
List<DataVPO> minList = devMap.get("MIN");
|
|
||||||
List<DataVPO> l1 = maxList.stream().filter(s->s.getVuDev()>overlimit.getVoltageDev()).collect(Collectors.toList());
|
|
||||||
List<DataVPO> l2 = minList.stream().filter(s->s.getVlDev()<overlimit.getUvoltageDev()).collect(Collectors.toList());
|
|
||||||
if (!CollectionUtils.isEmpty(l1) || !CollectionUtils.isEmpty(l2)){
|
if (!CollectionUtils.isEmpty(l1) || !CollectionUtils.isEmpty(l2)){
|
||||||
uDev++;
|
uDev++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user