Commit ca406db5 authored by caotao's avatar caotao

优化逆变器获取逻辑

parent 0b46f579
......@@ -2123,7 +2123,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
totalEquipmentList.forEach(indicatorsDto -> result.put(indicatorsDto.getEquipmentNumber(),"正常运行"));
String sql = "SELECT * FROM indicators_" + gatewayId + " WHERE frontModule='逆变器' and value = 'true' and (equipmentIndexName ='运行' or equipmentIndexName ='待机' or equipmentIndexName ='故障停机' or equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' or equipmentIndexName ='停机' or equipmentIndexName = '通讯故障' or equipmentIndexName = '降额运行') ;";
List<IndicatorsDto> indicatorsDtoList = influxDButils.getListData(sql, IndicatorsDto.class);
indicatorsDtoList.forEach(indicatorsDto -> result.put(indicatorsDto.getEquipmentNumber(),CommonConstans.pvStatus.get(indicatorsDto.getEquipmentIndexName())));
indicatorsDtoList.forEach(indicatorsDto -> {
if(!"运行".equals(indicatorsDto.getEquipmentIndexName())){
result.put(indicatorsDto.getEquipmentNumber(),CommonConstans.pvStatus.get(indicatorsDto.getEquipmentIndexName()));
}
});
return result;
}
}
......
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