|
@@ -115,7 +115,14 @@ public class ProjectDictService {
|
|
List<FileDictVo> list = list(projectDictDto);
|
|
List<FileDictVo> list = list(projectDictDto);
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
List<String> fileIds = list.stream().map(i -> i.getFileId()).collect(Collectors.toList());
|
|
List<String> fileIds = list.stream().map(i -> i.getFileId()).collect(Collectors.toList());
|
|
- return projectDictMapper.getFileList(projectDictDto.getFileId(), fileIds);
|
|
|
|
|
|
+ // 根据fileId查询所属层级
|
|
|
|
+ String parentId = programFileDictMapper.selectById(projectDictDto.getFileId()).getParentId();
|
|
|
|
+ if (CollectionUtils.isNotEmpty(fileIds) && StringUtils.isNotEmpty(projectDictDto.getFileId()) && !"0".equals(parentId)) {
|
|
|
|
+ fileIds.remove(projectDictDto.getFileId());
|
|
|
|
+ return projectDictMapper.getFileList(projectDictDto.getFileId(), fileIds);
|
|
|
|
+ } else {
|
|
|
|
+ return projectDictMapper.getFileParentList(projectDictDto.getFileId(), fileIds);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return new ArrayList<>();
|
|
return new ArrayList<>();
|
|
}
|
|
}
|