|
@@ -92,17 +92,20 @@ public class OrganizationManage { |
|
|
return pageVo; |
|
|
return pageVo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public List<OrganizationTreeVO> getChildOrganizationList(String parentCode) { |
|
|
|
|
|
|
|
|
public List<OrganizationTreeVO> getChildOrganizationList(String parentCode, String orgName) { |
|
|
List<String> parentCodeList = new ArrayList<>(); |
|
|
List<String> parentCodeList = new ArrayList<>(); |
|
|
List<DingOrganization> dingOrganizationList = new ArrayList<>(); |
|
|
List<DingOrganization> dingOrganizationList = new ArrayList<>(); |
|
|
if (StrUtils.isBlank(parentCode)) { |
|
|
if (StrUtils.isBlank(parentCode)) { |
|
|
parentCodeList = dingOrganizationProperties.getDeptVisibleScopes(); |
|
|
parentCodeList = dingOrganizationProperties.getDeptVisibleScopes(); |
|
|
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
|
|
.like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName) |
|
|
.in(DingOrganization::getOrganizationCode, parentCodeList)); |
|
|
.in(DingOrganization::getOrganizationCode, parentCodeList)); |
|
|
} else { |
|
|
} else { |
|
|
parentCodeList = CollectionUtil.toList(parentCode); |
|
|
parentCodeList = CollectionUtil.toList(parentCode); |
|
|
dingOrganizationList = iDingOrganizationService |
|
|
dingOrganizationList = iDingOrganizationService |
|
|
.list(Wrappers.lambdaQuery(DingOrganization.class).in(DingOrganization::getParentCode, parentCodeList)); |
|
|
|
|
|
|
|
|
.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
|
|
.like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName) |
|
|
|
|
|
.in(DingOrganization::getParentCode, parentCodeList)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(dingOrganizationList)) { |
|
|
if (CollectionUtils.isEmpty(dingOrganizationList)) { |
|
@@ -232,7 +235,7 @@ public class OrganizationManage { |
|
|
public void treeVOList(Boolean needMember, List<KeyTreeVO> basicOrgKeyTreeVOList) { |
|
|
public void treeVOList(Boolean needMember, List<KeyTreeVO> basicOrgKeyTreeVOList) { |
|
|
for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) { |
|
|
for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) { |
|
|
String parentCode = basicOrgKeyTreeVO.getKey(); |
|
|
String parentCode = basicOrgKeyTreeVO.getKey(); |
|
|
List<OrganizationTreeVO> childOrganizationList = getChildOrganizationList(parentCode); |
|
|
|
|
|
|
|
|
List<OrganizationTreeVO> childOrganizationList = getChildOrganizationList(parentCode, null); |
|
|
|
|
|
|
|
|
List<KeyTreeVO> orgKeyTreeVOList = childOrganizationList.stream().map(r -> { |
|
|
List<KeyTreeVO> orgKeyTreeVOList = childOrganizationList.stream().map(r -> { |
|
|
KeyTreeVO keyTreeVO = new KeyTreeVO(); |
|
|
KeyTreeVO keyTreeVO = new KeyTreeVO(); |
|
|