old mode 100644
new mode 100755
| | |
| | | ownerDto.setName(searchValue); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER, OwnerDto.OWNER_TYPE_CD_RENTING}); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "未找到成员信息或者查询到多条,请换其他条件查询"); |
| | | Assert.isNotNull(ownerDtos,"未找到成员信息,请换其他条件查询"); |
| | | //Assert.listOnlyOne(ownerDtos, "未找到成员信息或者查询到多条,请换其他条件查询"); |
| | | OwnerDto owner = queryByOwnerId(communityId, ownerDtos.get(0).getOwnerId()); |
| | | //查询是否有脱敏权限 |
| | | List<Map> mark = getPrivilegeOwnerList("/roomCreateFee", userId); |
| | |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-单元-房屋 如 1-1-1"); |
| | | } |
| | | |
| | | String[] values = searchValue.split("-"); |
| | | String[] values = searchValue.split("-",3); |
| | | |
| | | if (values.length != 3) { |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-单元-房屋 如 1-1-1"); |
| | |
| | | for (OwnerDto owner : ownerDtos) { |
| | | //对业主身份证号隐藏处理 |
| | | String idCard = owner.getIdCard(); |
| | | if (mark.size() == 0 && idCard != null && !idCard.equals("")) { |
| | | if (mark.size() == 0 && idCard != null && idCard.length() >= 16) { |
| | | idCard = idCard.substring(0, 6) + "**********" + idCard.substring(16); |
| | | } |
| | | //对业主手机号隐藏处理 |
| | | String link = owner.getLink(); |
| | | if (mark.size() == 0 && link != null && !link.equals("")) { |
| | | if (mark.size() == 0 && link != null && link.length() == 11) { |
| | | link = link.substring(0, 3) + "****" + link.substring(7); |
| | | } |
| | | owner.setIdCard(idCard); |
| | |
| | | List<ContractDto> contractDtos = contractInnerServiceSMOImpl.queryContracts(contractDto); |
| | | Assert.listOnlyOne(contractDtos, "未找到合同信息"); |
| | | |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomId(contractDtos.get(0).getObjId()); |
| | | roomDto.setCommunityId(communityId); |
| | | |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | Assert.listOnlyOne(roomDtos, "未找到房屋信息"); |
| | | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setRoomId(roomDtos.get(0).getRoomId()); |
| | | ownerDto.setMemberId(contractDtos.get(0).getObjId()); |
| | | ownerDto.setOwnerTypeCd(OwnerDto.OWNER_TYPE_CD_OWNER); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "未找到业主信息"); |
| | | Assert.listOnlyOne(ownerDtos, "未找到业主信息或者查询到多条,请换其他条件查询"); |
| | | //查询是否有脱敏权限 |
| | | List<Map> mark = getPrivilegeOwnerList("/roomCreateFee", userId); |
| | | List<OwnerDto> ownerDtoList = new ArrayList<>(); |
| | |
| | | owner.setLink(link); |
| | | ownerDtoList.add(owner); |
| | | } |
| | | |
| | | OwnerDto resOwnerDto = ownerDtoList.get(0); |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setOwnerId(ownerDtoList.get(0).getOwnerId()); |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | |
| | | //没有房屋 |
| | | if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) { |
| | | return resOwnerDto; |
| | | } |
| | | List<String> roomIds = new ArrayList<>(); |
| | | for (OwnerRoomRelDto tmpOwnerRoomRelDto : ownerRoomRelDtos) { |
| | | roomIds.add(tmpOwnerRoomRelDto.getRoomId()); |
| | | } |
| | | |
| | | |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomIds(roomIds.toArray(new String[roomIds.size()])); |
| | | roomDto.setCommunityId(communityId); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | resOwnerDto.setRooms(roomDtos); |
| | | |
| | | return resOwnerDto; |
| | | } |
| | | |