diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index bc9346fdd0..fbc4c68859 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -164,12 +164,14 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl houseIds=new HashSet<>(); houseIds.add(updateEntity.getDemandUserHouseId()); Result> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds); - if(houseInfoRes.success()&&CollectionUtils.isNotEmpty(houseInfoRes.getData())){ + if(!houseInfoRes.success()||CollectionUtils.isEmpty(houseInfoRes.getData())){ + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人房屋地址信息异常"+JSON.toJSONString(houseInfoRes)); + } HouseInfoDTO houseInfoDTO=houseInfoRes.getData().get(NumConstant.ZERO); updateEntity.setServiceLocation(houseInfoDTO.getNeighborAddress(). concat(houseInfoDTO.getNeighborHoodName()) @@ -178,7 +180,6 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl demandUserRes=epmetUserOpenFeignClient.getIcResiUserDTO(fromDTO.getDemandUserId()); if(!demandUserRes.success()||null==demandUserRes.getData()){ - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人信息异常"); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人信息异常"+ JSON.toJSONString(demandUserRes)); } - insertEntity.setDemandUserHouseId(demandUserRes.getData().getVillageId()); + insertEntity.setDemandUserHouseId(demandUserRes.getData().getHomeId()); // 查询需求人的居住地址 Set houseIds=new HashSet<>(); houseIds.add(insertEntity.getDemandUserHouseId()); Result> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds); - if(houseInfoRes.success()&&CollectionUtils.isNotEmpty(houseInfoRes.getData())){ - HouseInfoDTO houseInfoDTO=houseInfoRes.getData().get(NumConstant.ZERO); - insertEntity.setServiceLocation(houseInfoDTO.getNeighborAddress(). - concat(houseInfoDTO.getNeighborHoodName()) - .concat(houseInfoDTO.getBuildingName()) - .concat(houseInfoDTO.getUnitName()) - .concat(houseInfoDTO.getDoorName())); - insertEntity.setLongitude(houseInfoDTO.getBuildingLongitude()); - insertEntity.setLatitude(houseInfoDTO.getBuildingLatitude()); + if(!houseInfoRes.success()||CollectionUtils.isEmpty(houseInfoRes.getData())){ + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人房屋地址信息异常"+JSON.toJSONString(houseInfoRes)); } + HouseInfoDTO houseInfoDTO=houseInfoRes.getData().get(NumConstant.ZERO); + insertEntity.setServiceLocation(houseInfoDTO.getNeighborAddress(). + concat(houseInfoDTO.getNeighborHoodName()) + .concat(houseInfoDTO.getBuildingName()) + .concat(houseInfoDTO.getUnitName()) + .concat(houseInfoDTO.getDoorName())); + insertEntity.setLongitude(houseInfoDTO.getBuildingLongitude()); + insertEntity.setLatitude(houseInfoDTO.getBuildingLatitude()); baseDao.insert(insertEntity); IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); logEntity.setCustomerId(fromDTO.getCustomerId()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 4d6b728387..2c4989f718 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -687,6 +687,6 @@ public interface EpmetUserOpenFeignClient { * @param icResiUserId * @return */ - @GetMapping("/epmetuser/icresiuser/geticresiuser/{icResiUserId}") + @PostMapping(value = "/epmetuser/icresiuser/geticresiuser/{icResiUserId}") Result getIcResiUserDTO(@PathVariable("icResiUserId") String icResiUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index fd7f325a01..395a5d40b9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -633,7 +633,7 @@ public class IcResiUserController { * @param icResiUserId * @return */ - @GetMapping("geticresiuser/{icResiUserId}") + @PostMapping("geticresiuser/{icResiUserId}") public Result getIcResiUserDTO(@PathVariable("icResiUserId") String icResiUserId){ if(StringUtils.isNotBlank(icResiUserId)){ return new Result().ok(icResiUserService.get(icResiUserId));