|
@@ -57,6 +57,24 @@ public class SysDeptController extends BaseController {
|
|
return success(depts);
|
|
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);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取部门树列表
|
|
* 获取部门树列表
|
|
*/
|
|
*/
|
|
@@ -145,7 +163,7 @@ public class SysDeptController extends BaseController {
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
@ApiOperation("部门管理")
|
|
@ApiOperation("部门管理")
|
|
public void export(HttpServletResponse response, SysDept dept) {
|
|
public void export(HttpServletResponse response, SysDept dept) {
|
|
- List<SysDept> list = deptService.selectDeptList(dept);
|
|
|
|
|
|
+ List<SysDept> list = deptService.selectDeptListAll(dept);
|
|
ExcelUtil<SysDept> util = new ExcelUtil<SysDept>(SysDept.class);
|
|
ExcelUtil<SysDept> util = new ExcelUtil<SysDept>(SysDept.class);
|
|
util.exportExcel(response, list, "角色数据");
|
|
util.exportExcel(response, list, "角色数据");
|
|
}
|
|
}
|