|
@@ -196,23 +196,6 @@ public class ZhiHouseService {
|
|
|
return responseEntity.getBody().getMessage();
|
|
|
}
|
|
|
|
|
|
- public JSONObject getComponyInfo(String phone) {
|
|
|
- if(org.apache.commons.lang3.StringUtils.isBlank(phone)){
|
|
|
- throw new CommonBaseException(ResultCodeEnum.D101 , "入参不全,无法获取四维场景列表");
|
|
|
- }
|
|
|
- String url = zhiHouseHost + "company/getCompony";
|
|
|
- Map<String ,Object> params = new HashMap<>(1);
|
|
|
- params.put("phone",phone);
|
|
|
- ResponseEntity<ReturnDTO> responseEntity = restTemplate.postForEntity(url,params,ReturnDTO.class);
|
|
|
- if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
- throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
- }
|
|
|
- if (responseEntity.getBody().getCode() != 200) {
|
|
|
- throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
- }
|
|
|
- //把信息封装为json
|
|
|
- return JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getBody().getMessage()));
|
|
|
- }
|
|
|
|
|
|
public List<TbUser> getSysUserListByDeptIds(Long deptId) {
|
|
|
Map<String, Object> mp = new HashMap<>();
|
|
@@ -354,4 +337,22 @@ public class ZhiHouseService {
|
|
|
List<String> list = (List<String>) responseEntity.getBody().getMessage();
|
|
|
return list;
|
|
|
}
|
|
|
+
|
|
|
+ public JSONObject getCompanyId(Long companyId) {
|
|
|
+ if(companyId == null){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "入参不全,无法获取四维场景列表");
|
|
|
+ }
|
|
|
+ String url = zhiHouseHost + "company/getCompony";
|
|
|
+ Map<String ,Object> params = new HashMap<>(1);
|
|
|
+ params.put("id",companyId);
|
|
|
+ ResponseEntity<ReturnDTO> responseEntity = restTemplate.postForEntity(url,params,ReturnDTO.class);
|
|
|
+ if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
+ }
|
|
|
+ if (responseEntity.getBody().getCode() != 200) {
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
+ }
|
|
|
+ //把信息封装为json
|
|
|
+ return JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getBody().getMessage()));
|
|
|
+ }
|
|
|
}
|