|
@@ -814,7 +814,8 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
|
|
|
Set<String> availableProjectIds = availableProjects.stream().
|
|
Set<String> availableProjectIds = availableProjects.stream().
|
|
map(SimpleProjectVO::getProjectId).collect(Collectors.toSet());
|
|
map(SimpleProjectVO::getProjectId).collect(Collectors.toSet());
|
|
-
|
|
|
|
|
|
+ log.info("当前业态:{}", buildingTypes);
|
|
|
|
+ log.info("用户在当前业态下的可选项目:{}", availableProjectIds);
|
|
for (FilterPartitionVO partition : partitions) {
|
|
for (FilterPartitionVO partition : partitions) {
|
|
List<SimpleProjectVO> projects = partition.getProjects();
|
|
List<SimpleProjectVO> projects = partition.getProjects();
|
|
if (CollectionUtils.isEmpty(projects)) {
|
|
if (CollectionUtils.isEmpty(projects)) {
|
|
@@ -824,10 +825,14 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
map(SimpleProjectVO::getProjectId).collect(Collectors.toSet());
|
|
map(SimpleProjectVO::getProjectId).collect(Collectors.toSet());
|
|
// 取用户可选项目和分区下项目的交集,projectIds会被更新为两个集合的交集 projectIds是用户在分区下可选的项目
|
|
// 取用户可选项目和分区下项目的交集,projectIds会被更新为两个集合的交集 projectIds是用户在分区下可选的项目
|
|
projectIds.retainAll(availableProjectIds);
|
|
projectIds.retainAll(availableProjectIds);
|
|
|
|
+ log.info("当前分区:{}:{}", partition.getAreaId(), partition.getAreaName());
|
|
|
|
+ log.info("用户在当前业态当前分区下的可选项目:{}", projectIds);
|
|
// 根据业态和分区过滤项目
|
|
// 根据业态和分区过滤项目
|
|
List<PoemsProjectVO> projectsByAreaAndBuildingType = getProjectsByAreaAndBuildingTypes(partition.getAreaId(), buildingTypes);
|
|
List<PoemsProjectVO> projectsByAreaAndBuildingType = getProjectsByAreaAndBuildingTypes(partition.getAreaId(), buildingTypes);
|
|
Set<String> projectIdsByAreaAndBuildingType = projectsByAreaAndBuildingType.stream().
|
|
Set<String> projectIdsByAreaAndBuildingType = projectsByAreaAndBuildingType.stream().
|
|
map(PoemsProjectVO::getProjectId).collect(Collectors.toSet());
|
|
map(PoemsProjectVO::getProjectId).collect(Collectors.toSet());
|
|
|
|
+
|
|
|
|
+ log.info("当前分区该业态下的所有项目:{}", projectIdsByAreaAndBuildingType);
|
|
// projectIdsByAreaAndBuildingType.retainAll(availableProjectIds);
|
|
// projectIdsByAreaAndBuildingType.retainAll(availableProjectIds);
|
|
// 如果用户拥有的项目数和分区下的项目数不一致,则用户没有该分区的权限
|
|
// 如果用户拥有的项目数和分区下的项目数不一致,则用户没有该分区的权限
|
|
if (CollectionUtils.isEmpty(projectIds) || projectIdsByAreaAndBuildingType.size() != projectIds.size()) {
|
|
if (CollectionUtils.isEmpty(projectIds) || projectIdsByAreaAndBuildingType.size() != projectIds.size()) {
|