|
|
@ -257,7 +257,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
String queryScene, |
|
|
|
Integer pageNo, |
|
|
|
Integer pageSize, |
|
|
|
String rentFlag) { |
|
|
|
String id,String level, String rentFlag) { |
|
|
|
IcNeighborHoodResultDTO result = new IcNeighborHoodResultDTO(); |
|
|
|
//如果类型是house 查房屋
|
|
|
|
//IPage<Map<String, Object>> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize);
|
|
|
@ -265,23 +265,15 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
// 查询pids
|
|
|
|
String pids = null; |
|
|
|
if (StringUtils.isNotBlank(ancestorAgencyId)) { |
|
|
|
CustomerAgencyDTO agency = agencyservice.getAgencyById(ancestorAgencyId); |
|
|
|
|
|
|
|
if (agency == null) { |
|
|
|
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (NumConstant.ZERO_STR.equals(agency.getPid())) { |
|
|
|
pids = ancestorAgencyId; |
|
|
|
} else { |
|
|
|
pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId); |
|
|
|
pids = getPids(ancestorAgencyId); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(level) && level.equals("agency")){ |
|
|
|
pids = getPids(ancestorAgencyId); |
|
|
|
} |
|
|
|
|
|
|
|
IPage<IcHouseEntity> page = new Page<IcHouseEntity>(pageNo,pageSize); |
|
|
|
|
|
|
|
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene, rentFlag); |
|
|
|
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene,id,level,rentFlag); |
|
|
|
List<Map<String, Object>> records = mapIPage.getRecords(); |
|
|
|
records.forEach(item->{ |
|
|
|
item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey"))); |
|
|
@ -292,6 +284,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
result.setList(records); |
|
|
|
return result; |
|
|
|
} |
|
|
|
public String getPids(String agencyId){ |
|
|
|
String pids = null; |
|
|
|
CustomerAgencyDTO agency = agencyservice.getAgencyById(agencyId); |
|
|
|
|
|
|
|
if (agency == null) { |
|
|
|
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (NumConstant.ZERO_STR.equals(agency.getPid())) { |
|
|
|
pids = agencyId; |
|
|
|
} else { |
|
|
|
pids = agency.getPids().concat(StrConstant.COLON).concat(agencyId); |
|
|
|
} |
|
|
|
return pids; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception { |
|
|
|