|
|
@ -71,13 +71,26 @@ public class HouseController implements ResultDataResolver { |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("houselist") |
|
|
|
public Result<PageData<IcHouseListResultDTO>> houseList(@RequestBody IcHouseListFormDTO formDTO) { |
|
|
|
public Result<PageData<IcHouseListResultDTO>> houseList(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO) { |
|
|
|
//效验数据
|
|
|
|
LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); |
|
|
|
formDTO.setAgencyId(loginUserDetail.getAgencyId()); |
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
return new Result().ok(houseService.getHouseList(formDTO)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public LoginUserDetailsResultDTO getLoginUserDetailsResultDTO(@LoginUser TokenDto loginUser, String errorMsg) { |
|
|
|
LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); |
|
|
|
form.setUserId(loginUser.getUserId()); |
|
|
|
form.setClient(loginUser.getClient()); |
|
|
|
form.setApp(loginUser.getApp()); |
|
|
|
return getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form), ServiceConstant.EPMET_USER_SERVER, |
|
|
|
EpmetErrorCode.SERVER_ERROR.getCode(), |
|
|
|
errorMsg, |
|
|
|
null); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return |
|
|
|
* @Description 社区查询-搜索房屋 |
|
|
@ -105,14 +118,7 @@ public class HouseController implements ResultDataResolver { |
|
|
|
buildingName = null; |
|
|
|
} |
|
|
|
|
|
|
|
LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); |
|
|
|
form.setUserId(loginUser.getUserId()); |
|
|
|
form.setClient(loginUser.getClient()); |
|
|
|
form.setApp(loginUser.getApp()); |
|
|
|
LoginUserDetailsResultDTO loginUserDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form), ServiceConstant.EPMET_USER_SERVER, |
|
|
|
EpmetErrorCode.SERVER_ERROR.getCode(), |
|
|
|
"【社区查询-查询房屋】查询当前staff所在组织信息失败", |
|
|
|
null); |
|
|
|
LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【社区查询-查询房屋】查询当前staff所在组织信息失败"); |
|
|
|
formDTO.setAgencyId(loginUserDetail.getAgencyId()); |
|
|
|
formDTO.setBuildingName(buildingName); |
|
|
|
formDTO.setNeighborHoodName(neighborhoodName); |
|
|
|