| | |
| | | package com.java110.user.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.constant.CommunityMemberTypeConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.utils.constant.CommunityMemberTypeConstant; |
| | | import com.java110.utils.constant.OwnerTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.community.ICommunityInnerServiceSMO; |
| | | import com.java110.core.smo.owner.IOwnerInnerServiceSMO; |
| | |
| | | import com.java110.dto.UserDto; |
| | | import com.java110.user.dao.IOwnerServiceDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | //communityInnerServiceSMOImpl.getCommunityMembers() |
| | | //调用 小区服务查询 小区成员业主信息 |
| | | CommunityMemberDto communityMemberDto = BeanConvertUtil.covertBean(ownerDto, CommunityMemberDto.class); |
| | | /* CommunityMemberDto communityMemberDto = BeanConvertUtil.covertBean(ownerDto, CommunityMemberDto.class); |
| | | communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.OWNER); |
| | | if (StringUtils.isEmpty(communityMemberDto.getMemberId()) && !StringUtils.isEmpty(ownerDto.getOwnerId())) { |
| | | communityMemberDto.setMemberId(ownerDto.getOwnerId()); |
| | | } |
| | | List<CommunityMemberDto> communityMemberDtos = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto); |
| | | |
| | | if (communityMemberDtos == null || communityMemberDtos.size() < 1) { |
| | | return null; |
| | | }*/ |
| | | |
| | | int page = ownerDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | ownerDto.setPage((page - 1) * ownerDto.getRow()); |
| | | } |
| | | |
| | | Map ownerInfo = new HashMap(); |
| | | ownerInfo.put("ownerIds", getOwnerIds(communityMemberDtos)); |
| | | ownerInfo.put("ownerTypeCd", ownerDto.getOwnerTypeCd()); |
| | | Map ownerInfo = BeanConvertUtil.beanCovertMap(ownerDto); |
| | | ownerInfo.put("communityId",ownerDto.getCommunityId()); |
| | | ownerInfo.put("ownerTypeCd", OwnerTypeConstant.OWNER); |
| | | // ownerInfo.put("ownerIds", getOwnerIds(communityMemberDtos)); |
| | | //ownerInfo.put("ownerTypeCd", ownerDto.getOwnerTypeCd()); |
| | | ownerInfo.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | |
| | | List<OwnerDto> owners = BeanConvertUtil.covertBeanList(ownerServiceDaoImpl.getOwnerInfo(ownerInfo), OwnerDto.class); |
| | |
| | | public int queryOwnersCount(@RequestBody OwnerDto ownerDto) { |
| | | |
| | | //调用 小区服务查询 小区成员业主信息 |
| | | CommunityMemberDto communityMemberDto = new CommunityMemberDto(); |
| | | /*CommunityMemberDto communityMemberDto = new CommunityMemberDto(); |
| | | communityMemberDto.setCommunityId(ownerDto.getCommunityId()); |
| | | communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.OWNER); |
| | | return communityInnerServiceSMOImpl.getCommunityMemberCount(communityMemberDto); |
| | | return communityInnerServiceSMOImpl.getCommunityMemberCount(communityMemberDto);*/ |
| | | int page = ownerDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | ownerDto.setPage((page - 1) * ownerDto.getRow()); |
| | | } |
| | | |
| | | Map ownerInfo = BeanConvertUtil.beanCovertMap(ownerDto); |
| | | ownerInfo.put("communityId",ownerDto.getCommunityId()); |
| | | ownerInfo.put("ownerTypeCd", OwnerTypeConstant.OWNER); |
| | | // ownerInfo.put("ownerIds", getOwnerIds(communityMemberDtos)); |
| | | //ownerInfo.put("ownerTypeCd", ownerDto.getOwnerTypeCd()); |
| | | ownerInfo.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | |
| | | return ownerServiceDaoImpl.getOwnerInfoCount(ownerInfo); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | ownerDto.setPage((page - 1) * ownerDto.getRow()); |
| | | ownerDto.setRow(page * ownerDto.getRow()); |
| | | } |
| | | return ownerServiceDaoImpl.queryOwnersCount(BeanConvertUtil.beanCovertMap(ownerDto)); |
| | | } |
| | |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | ownerDto.setPage((page - 1) * ownerDto.getRow()); |
| | | ownerDto.setRow(page * ownerDto.getRow()); |
| | | } |
| | | List<OwnerDto> owners = BeanConvertUtil.covertBeanList( |
| | | ownerServiceDaoImpl.getOwnerInfoByCondition(BeanConvertUtil.beanCovertMap(ownerDto)), OwnerDto.class); |
| | |
| | | return owners; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryNoEnterRoomOwnerCount(@RequestBody OwnerDto ownerDto) { |
| | | return ownerServiceDaoImpl.queryNoEnterRoomOwnerCount(BeanConvertUtil.beanCovertMap(ownerDto)); |
| | | } |
| | | |
| | | @Override |
| | | public List<OwnerDto> queryOwnersByRoom(@RequestBody OwnerDto ownerDto) { |
| | | return BeanConvertUtil.covertBeanList(ownerServiceDaoImpl.queryOwnersByRoom(BeanConvertUtil.beanCovertMap(ownerDto)), OwnerDto.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<OwnerDto> queryOwnersByParkingSpace(@RequestBody OwnerDto ownerDto) { |
| | | return BeanConvertUtil.covertBeanList(ownerServiceDaoImpl.queryOwnersByParkingSpace(BeanConvertUtil.beanCovertMap(ownerDto)), OwnerDto.class); |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |