|
|
|
@ -114,11 +114,11 @@ public class DepartmentBO {
|
|
|
|
|
.departmentMark(e.getDepartmentMark())
|
|
|
|
|
.subCompanyId1(e.getSubCompanyId1())
|
|
|
|
|
.supDepId(e.getSupDepId())
|
|
|
|
|
.supDepName(e.getSupDepId() == 0 ? "" : getDeptNameById(e.getSupDepId()))
|
|
|
|
|
.supDepName(null == e.getSupDepId() || e.getSupDepId() == 0 ? "" : getDeptNameById(e.getSupDepId()))
|
|
|
|
|
//.deptPrincipalName(getEmployeeNameById(e.getDeptPrincipal()))
|
|
|
|
|
.build()).collect(Collectors.toList());
|
|
|
|
|
//获取非一级部门
|
|
|
|
|
Map<Integer, List<SingleDeptTreeVO>> collects = singleDeptTreeVOS.stream().filter(item -> !parentComp.equals(item.getSubCompanyId1()) && 0 != item.getSupDepId()).collect(Collectors.groupingBy(SingleDeptTreeVO::getSupDepId));
|
|
|
|
|
Map<Integer, List<SingleDeptTreeVO>> collects = singleDeptTreeVOS.stream().filter(item -> !parentComp.equals(item.getSubCompanyId1()) && null != item.getSupDepId() && 0 != item.getSupDepId()).collect(Collectors.groupingBy(SingleDeptTreeVO::getSupDepId));
|
|
|
|
|
|
|
|
|
|
return singleDeptTreeVOS.stream().peek(e -> e.setChildren(collects.get(e.getId()))).filter(item -> parentComp.equals(item.getSubCompanyId1())).collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|