【8.0】【org】修复组织机构查询树问题

pull/57/head
fengshuonan 2023-07-14 15:48:46 +08:00
parent 5e9b83d616
commit 401aa12def
1 changed files with 7 additions and 3 deletions

View File

@ -199,11 +199,15 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
commonOrgTreeRequest.setIndexOrgIdList(null);
}
// 如果查询待组织机构的状态信息则清空parentId
if (ObjectUtil.isNotEmpty(commonOrgTreeRequest.getIndexOrgIdList())) {
commonOrgTreeRequest.setOrgParentId(null);
}
// 根据条件查询组织机构列表
LambdaQueryWrapper<HrOrganization> wrapper = this.createCommonTreeWrapper(commonOrgTreeRequest);
wrapper.select(HrOrganization::getOrgId, HrOrganization::getOrgPids,
HrOrganization::getOrgParentId, HrOrganization::getOrgName, HrOrganization::getOrgSort,
HrOrganization::getOrgType);
wrapper.select(HrOrganization::getOrgId, HrOrganization::getOrgPids, HrOrganization::getOrgParentId, HrOrganization::getOrgName,
HrOrganization::getOrgSort, HrOrganization::getOrgType);
List<HrOrganization> hrOrganizationList = this.list(wrapper);
if (ObjectUtil.isEmpty(hrOrganizationList)) {