【8.0】【system】更新组织机构树接口

pull/57/head
fengshuonan 2023-07-13 22:30:47 +08:00
parent f37a43023c
commit afd02e8c35
1 changed files with 6 additions and 3 deletions

View File

@ -221,12 +221,15 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
newNotRepeatList.sort(Comparator.comparing(HrOrganization::getOrgSort));
// 构建树形结构
List<HrOrganization> hrOrganizations = new DefaultTreeBuildFactory<HrOrganization>().doTreeBuild(newNotRepeatList);
if (commonOrgTreeRequest.getOrgParentId() != null && !TreeConstants.DEFAULT_PARENT_ID.equals(
commonOrgTreeRequest.getOrgParentId())) {
newNotRepeatList = new DefaultTreeBuildFactory<HrOrganization>().doTreeBuild(newNotRepeatList);
}
// 遍历所有节点查询这些节点有没有子级填充haveSubOrgFlag
this.fillHaveSubFlag(hrOrganizations);
this.fillHaveSubFlag(newNotRepeatList);
return hrOrganizations;
return newNotRepeatList;
}
@Override