Commit cbce39a9 authored by chenzhao's avatar chenzhao

修改代码

parent 726efbf6
......@@ -921,4 +921,18 @@ public class OrgUsrController extends BaseController {
return ResponseHelper.buildResponse(iOrgUsrService.getByOrgCode(bizOrgCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "无权限单位树", notes = "无权限单位树")
@GetMapping(value = "/listCompanyTree")
public ResponseModel<List<OrgUsr>> listCompanyTree(@RequestParam(required = false) String orgType) throws Exception {
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
String bizOrgCode = personIdentity.getBizOrgCode();
List<OrgUsr> listByBizOrgTypeCode = iOrgUsrService.getListByBizOrgTypeCode(orgType, bizOrgCode);
return ResponseHelper.buildResponse(listByBizOrgTypeCode);
}
}
\ No newline at end of file
......@@ -172,4 +172,14 @@ public interface JcsFeign {
ResponseModel<Long> getMaintenanceId(
@RequestParam() String userId);
/**
* 查询有权限的公司部门列表
*
* @param authKey 权限key
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @return ResponseModel<OrgUsrDto>
*/
@GetMapping(value = "/org-usr/listCompanyTree")
FeignClientResult<List<OrgUsrDto>> getlistCompanyTree( @RequestParam(required = false) String orgType);
}
......@@ -1281,7 +1281,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
Map<String, Long> countMap = iVideoService.getVideoCountMap();
// 1.获取公司list
List<OrgUsrDto> orgUsrLists = jcsRemoteService.getCompanyDeptListWithAuth(authKey, "COMPANY");
List<OrgUsrDto> orgUsrLists = jcsRemoteService.getlistCompanyTree("COMPANY");
if (orgUsrLists.isEmpty()) {
return new ArrayList<>();
}
......
......@@ -41,4 +41,15 @@ public class JCSRemoteService {
return feignClientResult.getResult();
}
/**
*
* 查询无权限的公司部门列表
*
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @return List<OrgUsrDto>
*/
public List<OrgUsrDto> getlistCompanyTree( String orgType) {
FeignClientResult<List<OrgUsrDto>> feignClientResult = jcsFeignClient.getlistCompanyTree( orgType);
return feignClientResult.getResult();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment