|
|
@ -172,7 +172,23 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { |
|
|
|
|
|
|
|
//根据buildingID,tableName he columnName获取名字
|
|
|
|
//限制条数 一栋楼内最多显示1000 即可
|
|
|
|
PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{ |
|
|
|
for (String s : buildingIdList) { |
|
|
|
PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_HUNDRED,false).doSelectPage(()->{ |
|
|
|
List<UserWarnNameListResultDTO> dtos = icStatsResiWarnDao.userWarnListDTO(customerId, Arrays.asList(s), icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName()); |
|
|
|
if (!CollectionUtils.isEmpty(dtos)){ |
|
|
|
Map<String, List<UserWarnNameListResultDTO>> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId)); |
|
|
|
result.forEach(item->{ |
|
|
|
item.setConfigId(configId); |
|
|
|
groupByBuild.forEach((k,v) -> { |
|
|
|
if (item.getBuildingId().equals(k)){ |
|
|
|
item.setUserList(v); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
/*PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{ |
|
|
|
List<UserWarnNameListResultDTO> dtos = icStatsResiWarnDao.userWarnListDTO(customerId, buildingIdList, icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName()); |
|
|
|
if (!CollectionUtils.isEmpty(dtos)){ |
|
|
|
Map<String, List<UserWarnNameListResultDTO>> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId)); |
|
|
@ -185,7 +201,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
});*/ |
|
|
|
return mapResult; |
|
|
|
} |
|
|
|
|
|
|
|