bug修复
This commit is contained in:
parent
c86166dfb9
commit
7669048a8f
|
|
@ -819,19 +819,21 @@ public class BigScreenController {
|
|||
List<String> deployList = new ArrayList<>();
|
||||
Map<String, List<ScEquZhibiao>> zhibiaoMap = new HashMap<>();
|
||||
List<String> 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<String> listIds = survStationInfo.getDeviceList().stream().map(SurvDeviceDeploy::getId).collect(Collectors.toList());
|
||||
List<ScEquZhibiao> equList = zhibiaoService.getAllChemical(listIds);
|
||||
if(!equList.isEmpty()){
|
||||
zhibiaoMap.putAll(equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId)));
|
||||
}
|
||||
|
||||
List<SurvDeviceDeploy> remainList = new ArrayList<>();
|
||||
for (SurvDeviceDeploy survDeviceDeploy : survStationInfo.getDeviceList()) {
|
||||
deviceList.add(survDeviceDeploy.getDeviceCode());
|
||||
deployList.add(survDeviceDeploy.getId());
|
||||
|
||||
List<ScEquZhibiao> 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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue