|
@@ -57,6 +57,24 @@ public class SysDeptController extends BaseController {
|
|
|
return success(depts);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取部门列表,
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:dept:listAll')")
|
|
|
+ @GetMapping("/listAll")
|
|
|
+ public AjaxResult listAll(SysDept dept) {
|
|
|
+ List<SysDept> depts = deptService.selectDeptListAll(dept);
|
|
|
+ for (SysDept sysDept : depts) {
|
|
|
+ for (SysDept dept1 : depts) {
|
|
|
+ if (dept1.getDeptId().equals(sysDept.getParentId())) {
|
|
|
+ sysDept.setParentName(dept1.getDeptName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return success(depts);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取部门树列表
|
|
|
*/
|