修复设备统计bug
This commit is contained in:
parent
4b9c188e7b
commit
cc79dc0f07
|
|
@ -261,7 +261,7 @@ public class BigScreenController {
|
||||||
Integer count = 0;
|
Integer count = 0;
|
||||||
for (SurvStationInfo survStationInfo : stationList) {
|
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<>();
|
List<CommonDataTrans> dataTransList = new ArrayList<>();
|
||||||
survStationInfo.setName(count.toString());
|
survStationInfo.setName(count.toString());
|
||||||
List<String> deployList = new ArrayList<>();
|
List<String> deployList = new ArrayList<>();
|
||||||
|
|
@ -336,13 +336,17 @@ public class BigScreenController {
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
//补充设备数量
|
//补充设备数量
|
||||||
if(!orientIds.isEmpty()){
|
int counts = 0;
|
||||||
|
if(!deployList.isEmpty()){
|
||||||
//已配置的设备用指标数,未配置用1;
|
//已配置的设备用指标数,未配置用1;
|
||||||
for (String id : orientIds) {
|
for (String id : deployList) {
|
||||||
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
||||||
if(zhibiaos!=null){
|
if(zhibiaos!=null){
|
||||||
counts = counts + zhibiaos.size() -1;
|
counts = counts + zhibiaos.size();
|
||||||
|
}else{
|
||||||
|
counts = counts + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
survStationInfo.setDeviceCount(counts);
|
survStationInfo.setDeviceCount(counts);
|
||||||
|
|
|
||||||
|
|
@ -379,13 +379,17 @@ public class SurvStationInfoController {
|
||||||
//获取数据量
|
//获取数据量
|
||||||
curStation.setSurvDataCount(finalDataCounts);
|
curStation.setSurvDataCount(finalDataCounts);
|
||||||
//重新计算设备数
|
//重新计算设备数
|
||||||
int counts = curStation.getDeviceList().size();
|
// int counts = curStation.getDeviceList().size();
|
||||||
if(!orientIds.isEmpty()){
|
|
||||||
|
int counts = 0;
|
||||||
|
if(!deployList.isEmpty()){
|
||||||
//已配置的设备用指标数,未配置用1;
|
//已配置的设备用指标数,未配置用1;
|
||||||
for (String id : orientIds) {
|
for (String id : deployList) {
|
||||||
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
||||||
if(zhibiaos!=null){
|
if(zhibiaos!=null){
|
||||||
counts = counts + zhibiaos.size() -1;
|
counts = counts + zhibiaos.size();
|
||||||
|
}else{
|
||||||
|
counts = counts + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue