Commit 37025f1b authored by caotao's avatar caotao

1.无数据时返回数据异常问题处理

parent 8d1f2fcc
...@@ -640,7 +640,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -640,7 +640,7 @@ public class MonitorFanIdxController extends BaseController {
data8.put("title",columnMap.get("总辐射累计").toString()); data8.put("title",columnMap.get("总辐射累计").toString());
objects.add(data8); objects.add(data8);
Map<String, Object> data9 = new HashMap<>(); Map<String, Object> data9 = new HashMap<>();
data9.put("title","84.00%");//综合效率 data9.put("title","0.00%");//综合效率
objects.add(data9); objects.add(data9);
......
...@@ -254,7 +254,7 @@ public class MonitoringServiceIMQTTmpl { ...@@ -254,7 +254,7 @@ public class MonitoringServiceIMQTTmpl {
data6.put("title", Float.valueOf(columnMap.get("有功功率").toString())); data6.put("title", Float.valueOf(columnMap.get("有功功率").toString()));
objects.add(data6); objects.add(data6);
Map<String, Object> data7 = new HashMap<>(); Map<String, Object> data7 = new HashMap<>();
data7.put("title", 7.47); data7.put("title", 0.00);
objects.add(data7); objects.add(data7);
IPage<Map<String, Object>> result = new Page<>(); IPage<Map<String, Object>> result = new Page<>();
result.setRecords(objects); result.setRecords(objects);
......
...@@ -423,7 +423,7 @@ public class MonitoringServiceImpl { ...@@ -423,7 +423,7 @@ public class MonitoringServiceImpl {
speendOrirradiate = String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速")); speendOrirradiate = String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速"));
homeMapStationInfoDto.setSpeendOrirradiate(speendOrirradiate); homeMapStationInfoDto.setSpeendOrirradiate(speendOrirradiate);
} else { } else {
homeMapStationInfoDto.setSpeendOrirradiate(String.valueOf(Math.random() * 100)); homeMapStationInfoDto.setSpeendOrirradiate("0.00");
} }
StationCoordinate stationCoordinate = stationCoordinateList.stream().filter(stationCoordinate1 -> stationCoordinate1.getStationId().equals(stationBasic.getSequenceNbr())).collect(Collectors.toList()).get(0); StationCoordinate stationCoordinate = stationCoordinateList.stream().filter(stationCoordinate1 -> stationCoordinate1.getStationId().equals(stationBasic.getSequenceNbr())).collect(Collectors.toList()).get(0);
//获取场站经纬度 //获取场站经纬度
......
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