|
@@ -46,6 +46,14 @@ public class SysDeptController extends BaseController {
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public AjaxResult list(SysDept dept) {
|
|
public AjaxResult list(SysDept dept) {
|
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
|
|
+ for (SysDept sysDept : depts) {
|
|
|
|
+ for (SysDept dept1 : depts) {
|
|
|
|
+ if (dept1.getDeptId().equals(sysDept.getParentId())) {
|
|
|
|
+ sysDept.setParentName(dept1.getDeptName());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return success(depts);
|
|
return success(depts);
|
|
}
|
|
}
|
|
|
|
|