Commit d8e391d1 authored by chenzhao's avatar chenzhao

修改代码

parent c784e203
...@@ -1792,16 +1792,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1792,16 +1792,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
String querySql = " SELECT * FROM indicators_"+gatewayId+" WHERE ( equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' ) and value != 'true'"; String querySql = " SELECT * FROM indicators_"+gatewayId+" WHERE ( equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' ) and value != 'true'";
List<IndicatorsDto> queryList = influxDButils.getListData(querySql,IndicatorsDto.class); List<IndicatorsDto> queryList = influxDButils.getListData(querySql,IndicatorsDto.class);
List<String> collect = queryList.stream().map(IndicatorsDto::getEquipmentNumber).collect(Collectors.toList()); if (!ValidationUtil.isEmpty(queryList)) {
Set<String> strings = new HashSet<>(collect); List<String> collect = queryList.stream().map(IndicatorsDto::getEquipmentNumber).collect(Collectors.toList());
zcNum = collect.size()-strings.size(); Set<String> strings = new HashSet<>(collect);
zcNum = collect.size() - strings.size();
}
String querySql1 = " SELECT * FROM indicators_"+gatewayId+" equipmentIndexName ='通讯异常' and value = 'true'"; String querySql1 = " SELECT * FROM indicators_"+gatewayId+" equipmentIndexName ='通讯异常' and value = 'true'";
List<IndicatorsDto> queryList1 = influxDButils.getListData(querySql1,IndicatorsDto.class); List<IndicatorsDto> queryList1 = influxDButils.getListData(querySql1,IndicatorsDto.class);
List<String> collect1 = queryList.stream().map(IndicatorsDto::getEquipmentNumber).collect(Collectors.toList()); if (!ValidationUtil.isEmpty(queryList1)){
Set<String> strings1 = new HashSet<>(collect); List<String> collect1 = queryList.stream().map(IndicatorsDto::getEquipmentNumber).collect(Collectors.toList());
txNum = collect.size()-strings.size(); Set<String> strings1 = new HashSet<>(collect1);
txNum = collect1.size()-strings1.size();
}
numMap.put("djNum",djNum); numMap.put("djNum",djNum);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment