|
|
@@ -55,7 +55,7 @@ public class SysDeptController extends BaseController {
|
|
|
|
|
|
@PostMapping("/listOption")
|
|
|
public AjaxResult listOption(@RequestBody SysDept dept) {
|
|
|
- List<SysDept> depts = deptService.selectDeptList(dept);
|
|
|
+ List<SysDept> depts = deptService.selectDeptListByCollege(dept);
|
|
|
return AjaxResult.success(depts);
|
|
|
}
|
|
|
|
|
|
@@ -75,10 +75,7 @@ public class SysDeptController extends BaseController {
|
|
|
@ApiOperation("获取院系列表-不分页(按目前的需求约定第二级组织机构为院系)-应用数据权限")
|
|
|
@GetMapping("/departments/list")
|
|
|
public AjaxResult departments() {
|
|
|
- //为了方便查二级节点,这里约定根节点的ID为100。
|
|
|
- SysDept sysDept = new SysDept();
|
|
|
- sysDept.setParentId(100L);
|
|
|
- List<SysDept> depts = deptService.selectDeptList(sysDept);
|
|
|
+ List<SysDept> depts = deptService.selectDeptListByCollege(new SysDept());
|
|
|
return AjaxResult.success(depts);
|
|
|
}
|
|
|
|
|
|
@@ -99,11 +96,6 @@ public class SysDeptController extends BaseController {
|
|
|
@ApiOperation("获取楼栋列表-不分页(按目前的需求约定第三级组织机构为楼栋)-切勿应用数据权限")
|
|
|
@GetMapping("/{deptId}/building/list")
|
|
|
public AjaxResult building(@PathVariable("deptId") Long deptId) {
|
|
|
- //为了方便查楼栋级节点,这里约定根节点的ID为100。
|
|
|
- SysDept sysDept1 = deptService.selectDeptById(deptId);
|
|
|
- if (!sysDept1.getDeptId().equals(100L)) {
|
|
|
- AjaxResult.success();
|
|
|
- }
|
|
|
SysDept sysDept = new SysDept();
|
|
|
sysDept.setParentId(deptId);
|
|
|
//这里不要有数据权限
|
|
|
@@ -263,10 +255,8 @@ public class SysDeptController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/filterDept")
|
|
|
public AjaxResult filterDept() {
|
|
|
- //为了方便查楼栋级节点,这里约定根节点的ID为100。
|
|
|
SysDept sysDept1 = deptService.selectDeptById(tokenService.getLoginUser().getSysUser().getDeptId());
|
|
|
if(sysDept1.getParentId()==0){
|
|
|
- //为了方便查二级节点,这里约定根节点的ID为100。
|
|
|
SysDept sysDept = new SysDept();
|
|
|
sysDept.setParentId(sysDept1.getDeptId());
|
|
|
List<SysDept> depts = deptService.selectDeptList(sysDept);
|