diff --git a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java index a2a9ce0..87bc49b 100644 --- a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java +++ b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java @@ -827,6 +827,11 @@ public class BigScreenController { for (SurvDeviceDeploy survDeviceDeploy : survStationInfo.getDeviceList()) { deviceList.add(survDeviceDeploy.getDeviceCode()); deployList.add(survDeviceDeploy.getId()); + + List equList = zhibiaoService.getAllChemical(deployList); + if(!equList.isEmpty()){ + zhibiaoMap = equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId)); + } if(PollutionConstants.SOIL_SURV.equals(survDeviceDeploy.getDeployType())){//土壤设备 SurvTransdataSoilVo transdataSoil = transdataSoilService.getNewestData(survDeviceDeploy.getDeployCode()); if(transdataSoil!=null) { @@ -873,10 +878,7 @@ public class BigScreenController { survStationInfo.getDeviceList().retainAll(remainList); //补充在线状态 survStationInfo.setDeviceList(iotutils.addOnlineStatus(survStationInfo.getDeviceList())); - List equList = zhibiaoService.getAllChemical(deployList); - if(equList.size()>0){ - zhibiaoMap = equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId)); - } + } @@ -891,7 +893,7 @@ public class BigScreenController { } } } - survStationInfo.setDeviceCount(survStationInfo.getDeviceList().size()); + survStationInfo.setDeviceCount(counts); survStationInfo.setLatestData(returnArrs); survStationInfo.setLatestSoilData(returnSoilArrs); survStationInfo.setLatestAirData(returnAirArrs); diff --git a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java index 4cf3609..113a695 100644 --- a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java +++ b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java @@ -234,7 +234,7 @@ public class SurvStationInfoController { } } List equList = zhibiaoService.getShowedChemical(deployList); - if(equList.size()>0){ + if(!equList.isEmpty()){ zhibiaoMap = equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId)); TransZhiBiaoVo transZhiBiaoVo = new TransZhiBiaoVo(); transZhiBiaoVo.setZhibiaos(equList);