java110
2023-03-29 0b04f664887c73e90bf684a4e69c0fdbfe26349d
service-community/src/main/java/com/java110/community/bmo/room/impl/QueryRoomStatisticsBMOImpl.java
@@ -60,8 +60,13 @@
        List<String> ownerIds = new ArrayList<>();
        List<String> ownerTels = new ArrayList<>();
        for (RoomDto roomDto : roomDtos) {
            ownerIds.add(roomDto.getOwnerId());
            ownerTels.add(roomDto.getOwnerTel());
            if (!StringUtil.isEmpty(roomDto.getOwnerId())) {
                ownerIds.add(roomDto.getOwnerId());
            }
            if (!StringUtil.isEmpty(roomDto.getOwnerTel())) {
                ownerTels.add(roomDto.getOwnerTel());
            }
            roomIds.add(roomDto.getRoomId());
        }
@@ -113,6 +118,9 @@
     * @param roomDtos
     */
    private void queryRoomContract(List<String> roomIds, List<RoomDto> roomDtos) {
        if (roomDtos == null || roomDtos.size() < 1) {
            return;
        }
        Map info = new HashMap();
        info.put("communityId", roomDtos.get(0).getCommunityId());
        info.put("roomIds", roomIds.toArray(new String[roomIds.size()]));
@@ -120,14 +128,21 @@
        for (RoomDto roomDto : roomDtos) {
            for (Map count : repairCounts) {
                if (roomDto.getRoomId().equals(count.get("roomId"))) {
                    roomDto.setContractCount(count.get("contractCount").toString());
                if (!StringUtil.isEmpty(roomDto.getRoomId()) && !StringUtil.isEmpty(count.get("roomId").toString())) {
                    if (roomDto.getRoomId().equals(count.get("roomId").toString())) {
                        roomDto.setContractCount(count.get("contractCount").toString());
                    }
                } else {
                    continue;
                }
            }
        }
    }
    private void queryRoomOweFee(List<String> roomIds, List<RoomDto> roomDtos) {
        if (roomIds == null || roomIds.size() < 1) {
            return;
        }
        Map info = new HashMap();
        info.put("communityId", roomDtos.get(0).getCommunityId());
        info.put("roomIds", roomIds.toArray(new String[roomIds.size()]));
@@ -135,8 +150,12 @@
        for (RoomDto roomDto : roomDtos) {
            for (Map count : repairCounts) {
                if (roomDto.getRoomId().equals(count.get("roomId"))) {
                    roomDto.setRoomOweFee(count.get("oweFee").toString());
                if (!StringUtil.isEmpty(roomDto.getRoomId()) && !StringUtil.isEmpty(count.get("roomId").toString())) {
                    if (roomDto.getRoomId().equals(count.get("roomId").toString())) {
                        roomDto.setRoomOweFee(count.get("oweFee").toString());
                    }
                } else {
                    continue;
                }
            }
        }
@@ -149,15 +168,25 @@
     * @param roomDtos
     */
    private void queryOwnerOweFee(List<String> ownerIds, List<RoomDto> roomDtos) {
        if (ownerIds == null || ownerIds.size() < 1) {
            return;
        }
        Map info = new HashMap();
        info.put("communityId", roomDtos.get(0).getCommunityId());
        info.put("ownerIds", ownerIds.toArray(new String[ownerIds.size()]));
        List<Map> repairCounts = reportOweFeeInnerServiceSMOImpl.queryOweFeesByOwnerIds(info);
        for (RoomDto roomDto : roomDtos) {
            if(StringUtil.isEmpty(roomDto.getOwnerId())){
                continue;
            }
            for (Map count : repairCounts) {
                if (roomDto.getOwnerId().equals(count.get("ownerId"))) {
                    roomDto.setOweFee(count.get("oweFee").toString());
                if (!StringUtil.isEmpty(roomDto.getOwnerId()) && !StringUtil.isEmpty(count.get("ownerId").toString())) {
                    if (roomDto.getOwnerId().equals(count.get("ownerId").toString())) {
                        roomDto.setOweFee(count.get("oweFee").toString());
                    }
                } else {
                    continue;
                }
            }
        }
@@ -172,7 +201,9 @@
     */
    private void queryRepairCount(List<String> ownerTels, List<RoomDto> roomDtos) {
        if (ownerTels == null || ownerTels.size() < 1) {
            return;
        }
        Map info = new HashMap();
        info.put("communityId", roomDtos.get(0).getCommunityId());
        info.put("ownerTels", ownerTels.toArray(new String[ownerTels.size()]));
@@ -180,8 +211,12 @@
        for (RoomDto roomDto : roomDtos) {
            for (Map count : repairCounts) {
                if (roomDto.getLink().equals(count.get("ownerTel"))) {
                    roomDto.setRepairCount(count.get("repairCount").toString());
                if (!StringUtil.isEmpty(roomDto.getLink()) && !StringUtil.isEmpty(count.get("ownerTel").toString())) {
                    if (roomDto.getLink().equals(count.get("ownerTel").toString())) {
                        roomDto.setRepairCount(count.get("repairCount").toString());
                    }
                } else {
                    continue;
                }
            }
        }
@@ -194,7 +229,9 @@
     * @param roomDtos
     */
    private void queryComplaintCount(List<String> ownerTels, List<RoomDto> roomDtos) {
        if (ownerTels == null || ownerTels.size() < 1) {
            return;
        }
        Map info = new HashMap();
        info.put("communityId", roomDtos.get(0).getCommunityId());
@@ -203,8 +240,12 @@
        for (RoomDto roomDto : roomDtos) {
            for (Map count : complaintCounts) {
                if (roomDto.getLink().equals(count.get("ownerTel"))) {
                    roomDto.setComplaintCount(count.get("complaintCount").toString());
                if (!StringUtil.isEmpty(roomDto.getLink()) && !StringUtil.isEmpty(count.get("ownerTel").toString())) {
                    if (roomDto.getLink().equals(count.get("ownerTel").toString())) {
                        roomDto.setComplaintCount(count.get("complaintCount").toString());
                    }
                } else {
                    continue;
                }
            }
        }
@@ -217,13 +258,23 @@
     * @param roomDtos
     */
    private void queryCarCount(List<String> ownerIds, List<RoomDto> roomDtos) {
        if (ownerIds == null || ownerIds.size() < 1) {
            return;
        }
        List<Map> memberCounts = ownerCarV1InnerServiceSMOImpl.queryOwnerCarCountByOwnerIds(ownerIds);
        for (RoomDto roomDto : roomDtos) {
            if(StringUtil.isEmpty(roomDto.getOwnerId())){
                continue;
            }
            for (Map count : memberCounts) {
                if (roomDto.getOwnerId().equals(count.get("ownerId"))) {
                    roomDto.setCarCount(count.get("carCount").toString());
                if (!StringUtil.isEmpty(roomDto.getOwnerId()) && !StringUtil.isEmpty(count.get("ownerId").toString())) {
                    if (roomDto.getOwnerId().equals(count.get("ownerId").toString())) {
                        roomDto.setCarCount(count.get("carCount").toString());
                    }
                } else {
                    continue;
                }
            }
        }
@@ -236,10 +287,16 @@
     * @param roomDtos
     */
    private void queryOwnerMemberCount(List<String> ownerIds, List<RoomDto> roomDtos) {
        if (ownerIds == null || ownerIds.size() < 1) {
            return;
        }
        List<Map> memberCounts = ownerV1InnerServiceSMOImpl.queryOwnerMembersCount(ownerIds);
        for (RoomDto roomDto : roomDtos) {
            if(StringUtil.isEmpty(roomDto.getOwnerId())){
                continue;
            }
            for (Map count : memberCounts) {
                if (roomDto.getOwnerId().equals(count.get("ownerId"))) {
                    roomDto.setMemberCount(count.get("memberCount").toString());
@@ -256,15 +313,19 @@
     */
    private void queryRoomCount(List<String> ownerIds, List<RoomDto> roomDtos) {
        if (ownerIds == null || ownerIds.size() < 1) {
            return;
        }
        //查询业主房屋数
        List<Map> ownerRoomCounts = ownerRoomRelV1InnerServiceSMOImpl.queryRoomCountByOwnerIds(ownerIds);
        for (RoomDto roomDto : roomDtos) {
            for (Map count : ownerRoomCounts) {
                if(StringUtil.isEmpty(roomDto.getOwnerId())){
                if (StringUtil.isEmpty(roomDto.getOwnerId()) || StringUtil.isEmpty(count.get("ownerId").toString())) {
                    continue;
                }
                if (roomDto.getOwnerId().equals(count.get("ownerId"))) {
                if (roomDto.getOwnerId().equals(count.get("ownerId").toString())) {
                    roomDto.setRoomCount(count.get("roomCount").toString());
                }
            }