张天森
2022-10-12 3c884ccd7b51edf3b36840bf99de5edaa41a38a7
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java
@@ -99,9 +99,8 @@
                cascadeHouseVOList = this.baseMapper.getHouseLevelByAlley(cascadeHouseDTO.getCommunityId(),
                    cascadeHouseDTO.getVillageId());
                cascadeHouseVOList = cascadeHouseVOList.stream()
                    .collect(Collectors.collectingAndThen(
                        Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getAlley()))),
                        ArrayList::new));
                    .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
                            Comparator.comparing(ComMngCascadeHouseVO::getAlley))),ArrayList::new));
                cascadeHouseVOList.forEach(cascade -> {
                    cascade.setName(cascade.getAlley());
                });
@@ -117,7 +116,7 @@
                                () -> new TreeSet<>(Comparator.comparing(o -> o.getAlley() + ";" + o.getHouseNum()))),
                                ArrayList::new));
                    cascadeHouseVOList.forEach(cascade -> {
                        cascade.setName(cascade.getHouseNum());
                        cascade.setName(cascade.getHouseNum()+"("+cascade.getName()+")");
                    });
                }
                break;
@@ -435,8 +434,8 @@
                // subordinateList =
                // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new
                // TreeSet<>(Comparator.comparing(o -> o.getFloor()))), ArrayList::new));
                subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor))
                    .collect(Collectors.toList());
//                subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor))
//                    .collect(Collectors.toList());
                subordinateList.forEach(cascade -> {
                    if (cascade.getFloor().contains("栋")) {
                        cascade.setName(cascade.getFloor());
@@ -449,8 +448,8 @@
                if (houseDO != null) {
                    subordinateList =
                        this.baseMapper.getHouseLevelByUnitNos(houseDO.getVillageId(), houseDO.getFloor());
                    subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo))
                        .collect(Collectors.toList());
//                    subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo))
//                        .collect(Collectors.toList());
                    // subordinateList =
                    // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new
                    // TreeSet<>(Comparator.comparing(o -> o.getUnitNo()))), ArrayList::new));
@@ -467,8 +466,8 @@
                if (houseDO != null) {
                    subordinateList = this.baseMapper.getHouseLevelByHouseNos(houseDO.getVillageId(),
                        houseDO.getFloor(), houseDO.getUnitNo());
                    subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo))
                        .collect(Collectors.toList());
//                    subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo))
//                        .collect(Collectors.toList());
                    // subordinateList =
                    // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new
                    // TreeSet<>(Comparator.comparing(o -> o.getHouseNo()))), ArrayList::new));