|
@@ -106,6 +106,18 @@ public class OrgApi {
|
|
return new ResponseEntity(orgRepo.findByParentId(parentId), HttpStatus.OK);
|
|
return new ResponseEntity(orgRepo.findByParentId(parentId), HttpStatus.OK);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "查询下属机构不带分页", notes = "不分页")
|
|
|
|
+ @GetMapping("/sub/both/{parentId}")
|
|
|
|
+ public ResponseEntity getBothOrg(@PathVariable Long parentId,HttpServletRequest request) {
|
|
|
|
+ AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
|
|
|
|
+ if(accessUser != null){
|
|
|
|
+ if(accessUser.getRootOrgId().longValue() != accessUser.getOrgId().longValue()){
|
|
|
|
+ return new ResponseEntity(orgRepo.findById(parentId), HttpStatus.OK);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new ResponseEntity(orgRepo.findBothByParentId(parentId), HttpStatus.OK);
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "查询下属机构分页带查询", notes = "分页")
|
|
@ApiOperation(value = "查询下属机构分页带查询", notes = "分页")
|
|
@GetMapping("/sub/{parentId}/{curPage}/{pageSize}")
|
|
@GetMapping("/sub/{parentId}/{curPage}/{pageSize}")
|
|
public ResponseEntity getAllSubOrg(@ModelAttribute Org orgCriteria,
|
|
public ResponseEntity getAllSubOrg(@ModelAttribute Org orgCriteria,
|