同步代码

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 { try {
// 先查第四层类型 // 先查第四层类型
listL4 = backApplyMapper.getUseTypeTreeL4(bean); listL4 = backApplyMapper.getUseTypeTreeL4(bean);
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(listL4)) {
// 根据第四层parentId 查第三层类型 List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds); // 根据第四层parentId 查第三层类型
List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList()); listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds);
// 根据第三层parentId 查第1.2层类型 List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList());
listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds); // 根据第三层parentId 查第1.2层类型
list.addAll(listL4); listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds);
list.addAll(listL3); list.addAll(listL4);
list.addAll(listL21); list.addAll(listL3);
list.addAll(listL21);
}
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
// 创建树形结构数据集合作为参数 // 创建树形结构数据集合作为参数
TypeTreeBuild treeBuild = new TypeTreeBuild(list); TypeTreeBuild treeBuild = new TypeTreeBuild(list);