Commit a87b3bf1 authored by chenzhao's avatar chenzhao

修改代码

parent 308150c2
...@@ -1486,6 +1486,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1486,6 +1486,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public HashMap<String, Object> SpeedIndicator(String gatewayId ,String equipmentNumber,String equipmentIndexName){ public HashMap<String, Object> SpeedIndicator(String gatewayId ,String equipmentNumber,String equipmentIndexName){
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
String sql = "SELECT * FROM indicators_"+gatewayId+" WHERE equipmentNumber ='"+equipmentNumber +"' and equipmentIndexName = '"+equipmentIndexName+"'"; String sql = "SELECT * FROM indicators_"+gatewayId+" WHERE equipmentNumber ='"+equipmentNumber +"' and equipmentIndexName = '"+equipmentIndexName+"'";
log.info("执行sql"+sql);
List<IndicatorsDto> list = influxDButils.getListData(sql, IndicatorsDto.class); List<IndicatorsDto> list = influxDButils.getListData(sql, IndicatorsDto.class);
if (!ValidationUtil.isEmpty(list)){ if (!ValidationUtil.isEmpty(list)){
resultMap.put("value",String.format("%.2f",Double.parseDouble(list.get(0).getValue()))); resultMap.put("value",String.format("%.2f",Double.parseDouble(list.get(0).getValue())));
......
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