同步代码

This commit is contained in:
sxu 2024-08-23 17:43:38 +08:00
parent b0f06c6e6f
commit 5c008fc934
1 changed files with 11 additions and 9 deletions

View File

@ -371,15 +371,17 @@ public class BackApplyServiceImpl implements BackApplyService {
try {
// 先查第四层类型
listL4 = backApplyMapper.getUseTypeTreeL4(bean);
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
// 根据第四层parentId 查第三层类型
listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds);
List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList());
// 根据第三层parentId 查第1.2层类型
listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds);
list.addAll(listL4);
list.addAll(listL3);
list.addAll(listL21);
if (CollectionUtils.isNotEmpty(listL4)) {
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
// 根据第四层parentId 查第三层类型
listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds);
List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList());
// 根据第三层parentId 查第1.2层类型
listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds);
list.addAll(listL4);
list.addAll(listL3);
list.addAll(listL21);
}
if (CollectionUtils.isNotEmpty(list)) {
// 创建树形结构数据集合作为参数
TypeTreeBuild treeBuild = new TypeTreeBuild(list);