档案管理树结构修改
This commit is contained in:
parent
357063ea1e
commit
f64f7559db
|
|
@ -89,13 +89,17 @@ public class FileManagementController extends BaseController {
|
|||
@SysLog(title = "第四级档案信息", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "第四级档案信息", logType = 1)
|
||||
@RequiresPermissions("file:manage:query")
|
||||
public TableDataInfo getFileManage(DaKyProFilesContentsDto dto) {
|
||||
Integer level = fileManageMapper.getLevelById(dto.getParentId().toString());
|
||||
if (level == 4) {
|
||||
startPage();
|
||||
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
||||
return getDataTable(list);
|
||||
} else {
|
||||
if (dto.getParentId() == 0) {
|
||||
return getDataTable(new ArrayList<>());
|
||||
} else {
|
||||
Integer level = fileManageMapper.getLevelById(dto.getParentId().toString());
|
||||
if (level == 4) {
|
||||
startPage();
|
||||
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
||||
return getDataTable(list);
|
||||
} else {
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class TreeBuilder {
|
|||
.collect(Collectors.toList());
|
||||
|
||||
// 使用 Map 提升查找效率
|
||||
Map<Integer, DaKyProFilesContentsDto> map = new HashMap<>();
|
||||
Map<String, DaKyProFilesContentsDto> map = new HashMap<>();
|
||||
List<DaKyProFilesContentsDto> roots = new ArrayList<>();
|
||||
|
||||
// 第一步:将所有节点放入 map
|
||||
|
|
@ -70,7 +70,7 @@ public class TreeBuilder {
|
|||
if (parentId == null) {
|
||||
roots.add(item);
|
||||
} else {
|
||||
DaKyProFilesContentsDto parent = map.get(parentId);
|
||||
DaKyProFilesContentsDto parent = map.get(parentId.toString());
|
||||
if (parent != null) {
|
||||
parent.getChildren().add(item);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue