From 7669048a8fd590b8a66328b211169804d3b23f27 Mon Sep 17 00:00:00 2001 From: zy <82248909@qq.com> Date: Mon, 1 Dec 2025 12:06:48 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BigScreenController.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) 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 6bdb4d5..5c75511 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 @@ -819,19 +819,21 @@ public class BigScreenController { List deployList = new ArrayList<>(); Map> zhibiaoMap = new HashMap<>(); List orientIds = new ArrayList<>(); - + //设备数量 + int counts = survStationInfo.getDeviceList()!=null?survStationInfo.getDeviceList().size():0; if(survStationInfo.getDeviceList()!=null&&survStationInfo.getDeviceList().size()>0){ - //补充设备数量 - survStationInfo.setDeviceCount(survStationInfo.getDeviceList().size()); + List listIds = survStationInfo.getDeviceList().stream().map(SurvDeviceDeploy::getId).collect(Collectors.toList()); + List equList = zhibiaoService.getAllChemical(listIds); + if(!equList.isEmpty()){ + zhibiaoMap.putAll(equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId))); + } + List remainList = new ArrayList<>(); for (SurvDeviceDeploy survDeviceDeploy : survStationInfo.getDeviceList()) { deviceList.add(survDeviceDeploy.getDeviceCode()); deployList.add(survDeviceDeploy.getId()); - List equList = zhibiaoService.getAllChemical(deployList); - if(!equList.isEmpty()){ - zhibiaoMap.putAll(equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId))); - } + if(PollutionConstants.SOIL_SURV.equals(survDeviceDeploy.getDeployType())){//土壤设备 SurvTransdataSoilVo transdataSoil = transdataSoilService.getNewestData(survDeviceDeploy.getDeployCode()); if(transdataSoil!=null) { @@ -878,12 +880,9 @@ public class BigScreenController { survStationInfo.getDeviceList().retainAll(remainList); //补充在线状态 survStationInfo.setDeviceList(iotutils.addOnlineStatus(survStationInfo.getDeviceList())); - - } - //重新计算设备数 - int counts = survStationInfo.getDeviceList().size(); + if(!orientIds.isEmpty()){ //已配置的设备用指标数,未配置用1; for (String id : orientIds) {