| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | break; |
| | | } |
| | | |
| | | if(ownerDto == null){ |
| | | if (ownerDto == null) { |
| | | return ResultVo.createResponseEntity(1, 1, ownerDto); |
| | | } |
| | | //todo 查询账户余额 |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setObjId(ownerDto.getMemberId()); |
| | | accountDto.setPartId(communityId); |
| | | accountDto.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | List<AccountDto> accountDtos =accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | if(!ListUtil.isNull(accountDtos)){ |
| | | ownerDto.setAcctAmount(accountDtos.get(0).getAmount()); |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | if (ListUtil.isNull(accountDtos)) { |
| | | return ResultVo.createResponseEntity(1, 1, ownerDto); |
| | | } |
| | | BigDecimal accountDec = new BigDecimal("0"); |
| | | for (AccountDto tmpAccountDto : accountDtos) { |
| | | accountDec = accountDec.add(new BigDecimal(tmpAccountDto.getAmount())); |
| | | } |
| | | accountDec = accountDec.setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | |
| | | ownerDto.setAcctAmount(accountDec.doubleValue() + ""); |
| | | |
| | | return ResultVo.createResponseEntity(1, 1, ownerDto); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setIdCard(searchValue); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER, OwnerDto.OWNER_TYPE_CD_RENTING}); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER}); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "未找到成员信息或者查询到多条,请换其他条件查询"); |
| | | OwnerDto owner = queryByOwnerId(communityId, ownerDtos.get(0).getOwnerId()); |
| | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setLink(searchValue); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER, OwnerDto.OWNER_TYPE_CD_RENTING}); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER}); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "未找到成员信息或者查询到多条,请换其他条件查询"); |
| | | OwnerDto owner = queryByOwnerId(communityId, ownerDtos.get(0).getOwnerId()); |
| | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setName(searchValue); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER, OwnerDto.OWNER_TYPE_CD_RENTING}); |
| | | ownerDto.setOwnerTypeCds(new String[]{OwnerDto.OWNER_TYPE_CD_MEMBER}); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | Assert.isNotNull(ownerDtos,"未找到成员信息,请换其他条件查询"); |
| | | Assert.isNotNull(ownerDtos, "未找到成员信息,请换其他条件查询"); |
| | | //Assert.listOnlyOne(ownerDtos, "未找到成员信息或者查询到多条,请换其他条件查询"); |
| | | OwnerDto owner = queryByOwnerId(communityId, ownerDtos.get(0).getOwnerId()); |
| | | //查询是否有脱敏权限 |
| | |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-商铺 如 1-1"); |
| | | } |
| | | |
| | | String[] values = searchValue.split("-",3); |
| | | String[] values = searchValue.split("-", 3); |
| | | |
| | | if (values.length != 2) { |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-商铺 如 1-1"); |
| | |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-单元-房屋 如 1-1-1"); |
| | | } |
| | | |
| | | String[] values = searchValue.split("-",3); |
| | | String[] values = searchValue.split("-", 3); |
| | | |
| | | if (values.length != 3) { |
| | | throw new IllegalArgumentException("查询内容格式错误,请输入 楼栋-单元-房屋 如 1-1-1"); |
| | |
| | | |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | //Assert.listOnlyOne(roomDtos, "未找到房屋信息"); |
| | | if(roomDtos == null || roomDtos.size() < 1){ |
| | | if (roomDtos == null || roomDtos.size() < 1) { |
| | | throw new IllegalArgumentException("未找到房屋信息"); |
| | | } |
| | | |
| | |
| | | ownerDto.setOwnerTypeCd(OwnerDto.OWNER_TYPE_CD_OWNER); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | //Assert.listOnlyOne(ownerDtos, "未找到业主信息"); |
| | | if(ownerDtos == null || ownerDtos.size() < 1){ |
| | | if (ownerDtos == null || ownerDtos.size() < 1) { |
| | | throw new IllegalArgumentException("未找到业主信息"); |
| | | } |
| | | |