修复设备统计bug

This commit is contained in:
zhangyue 2026-08-19 18:57:47 +08:00
parent 4b9c188e7b
commit cc79dc0f07
2 changed files with 18 additions and 10 deletions

View File

@ -261,7 +261,7 @@ public class BigScreenController {
Integer count = 0;
for (SurvStationInfo survStationInfo : stationList) {
//设备数量
int counts = survStationInfo.getDeviceList()!=null?survStationInfo.getDeviceList().size():0;
// int counts = survStationInfo.getDeviceList()!=null?survStationInfo.getDeviceList().size():0;
List<CommonDataTrans> dataTransList = new ArrayList<>();
survStationInfo.setName(count.toString());
List<String> deployList = new ArrayList<>();
@ -336,13 +336,17 @@ public class BigScreenController {
count++;
//补充设备数量
if(!orientIds.isEmpty()){
int counts = 0;
if(!deployList.isEmpty()){
//已配置的设备用指标数未配置用1
for (String id : orientIds) {
for (String id : deployList) {
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
if(zhibiaos!=null){
counts = counts + zhibiaos.size() -1;
counts = counts + zhibiaos.size();
}else{
counts = counts + 1;
}
}
}
survStationInfo.setDeviceCount(counts);

View File

@ -379,13 +379,17 @@ public class SurvStationInfoController {
//获取数据量
curStation.setSurvDataCount(finalDataCounts);
//重新计算设备数
int counts = curStation.getDeviceList().size();
if(!orientIds.isEmpty()){
// int counts = curStation.getDeviceList().size();
int counts = 0;
if(!deployList.isEmpty()){
//已配置的设备用指标数未配置用1
for (String id : orientIds) {
for (String id : deployList) {
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
if(zhibiaos!=null){
counts = counts + zhibiaos.size() -1;
counts = counts + zhibiaos.size();
}else{
counts = counts + 1;
}
}
}