修复部门树构建逻辑并优化查询排序
parent
e6257d8f66
commit
9298d54baf
|
|
@ -177,13 +177,13 @@ public class DepartmentQueryExe {
|
||||||
//按照企业分组
|
//按照企业分组
|
||||||
List<List<DepartmentTreeInfoCO>> result1= new ArrayList<>();
|
List<List<DepartmentTreeInfoCO>> result1= new ArrayList<>();
|
||||||
List<DepartmentTreeInfoCO> result2= new ArrayList<>();
|
List<DepartmentTreeInfoCO> result2= new ArrayList<>();
|
||||||
Map<Long, List<DepartmentTreeInfoCO>> corpMap = examCenterCOS.stream().collect(Collectors.groupingBy(DepartmentTreeInfoCO::getCorpinfoId));
|
// Map<Long, List<DepartmentTreeInfoCO>> corpMap = examCenterCOS.stream().collect(Collectors.groupingBy(DepartmentTreeInfoCO::getCorpinfoId));
|
||||||
corpMap.forEach((corpId, list) -> {
|
// corpMap.forEach((corpId, list) -> {
|
||||||
List<DepartmentTreeInfoCO> departmentTreeInfoCOS = Tools.buildEntityTree(list, "id", "parentId", "childrenList", 0L);
|
List<DepartmentTreeInfoCO> departmentTreeInfoCOS = Tools.buildEntityTree(examCenterCOS, "id", "parentId", "childrenList", 0L);
|
||||||
if(CollUtil.isNotEmpty(departmentTreeInfoCOS)){
|
if(CollUtil.isNotEmpty(departmentTreeInfoCOS)){
|
||||||
result2.addAll(departmentTreeInfoCOS);
|
result2.addAll(departmentTreeInfoCOS);
|
||||||
}
|
}
|
||||||
});
|
// });
|
||||||
return result2;
|
return result2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by d.dep_order, d.create_time desc
|
order by c.corp_order, c.create_time desc,d.dep_order, d.create_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue