|
@@ -175,10 +175,14 @@ public class SysDeptController extends BaseController {
|
|
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
@ApiOperation("部门导出")
|
|
@ApiOperation("部门导出")
|
|
- public void export(HttpServletResponse response, SysDept dept) {
|
|
|
|
- List<SysDept> list = forDeptList(dept);
|
|
|
|
|
|
+ public void export(HttpServletResponse response, @RequestBody SysDept dept) {
|
|
|
|
+ List<SysDept> depts = deptService.selectDeptListAll(dept);
|
|
|
|
+ for (SysDept sysDept : depts) {
|
|
|
|
+ SysDept current= deptService.selectDeptById(sysDept.getParentId());
|
|
|
|
+ sysDept.setParentName(current.getDeptName());
|
|
|
|
+ }
|
|
ExcelUtil<SysDept> util = new ExcelUtil<SysDept>(SysDept.class);
|
|
ExcelUtil<SysDept> util = new ExcelUtil<SysDept>(SysDept.class);
|
|
- util.exportExcel(response, list, "部门数据");
|
|
|
|
|
|
+ util.exportExcel(response, depts, "部门数据");
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|