wlzboy
3 天以前 40a8157440e3b906da8f52e07d939d78c3f4c313
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
@@ -74,6 +74,18 @@
    }
    /**
     * 获取所有分公司列表(parentId=100的部门)
     */
    @GetMapping("/branch/all")
    public AjaxResult listAllBranches()
    {
        SysDept query = new SysDept();
        query.setParentId(100L);
        List<SysDept> depts = deptService.selectDeptList(query);
        return success(depts);
    }
    /**
     * 查询部门列表(排除节点)
     */
    @GetMapping("/list/exclude/{deptId}")
@@ -155,4 +167,18 @@
        deptService.checkDeptDataScope(deptId);
        return toAjax(deptService.deleteDeptById(deptId));
    }
    /**
     * 根据service_class查询部门信息
     */
    @GetMapping("/service-class/{serviceClass}")
    public AjaxResult getDeptByServiceClass(@PathVariable String serviceClass)
    {
        SysDept dept = deptService.selectDeptByServiceClass(serviceClass);
        if (dept != null) {
            return success(dept);
        } else {
            return error("未找到对应的部门信息");
        }
    }
}