| | |
| | | } |
| | | |
| | | /** |
| | | * 获取所有分公司列表(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}") |
| | |
| | | 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("未找到对应的部门信息"); |
| | | } |
| | | } |
| | | } |