|
|
@@ -109,16 +109,26 @@ public class OrganizationManage { |
|
|
|
|
|
|
|
public List<KeyTreeVO> treeRubbishVOList(ReqSynthesizePO request) { |
|
|
|
String organizationCode = request.getOrganizationCode(); |
|
|
|
String organizationName = request.getOrganizationName(); |
|
|
|
|
|
|
|
List<DingOrganization> dingOrganizationList = new ArrayList<>(); |
|
|
|
List<String> organizationCodeList = new ArrayList<>(); |
|
|
|
if (StrUtils.isBlank(organizationCode)) { |
|
|
|
if (StringUtils.isNotBlank(organizationName)) { |
|
|
|
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
.like(DingOrganization::getOrganizationName, organizationName)); |
|
|
|
if (dingOrganizationList.size() == 0) { |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
} else if (StrUtils.isBlank(organizationCode)) { |
|
|
|
organizationCodeList = dingOrganizationProperties.getDeptVisibleScopes(); |
|
|
|
} else { |
|
|
|
organizationCodeList = CollectionUtil.toList(organizationCode); |
|
|
|
} |
|
|
|
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
.in(DingOrganization::getOrganizationCode, organizationCodeList)); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(dingOrganizationList)) { |
|
|
|
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
.in(DingOrganization::getOrganizationCode, organizationCodeList)); |
|
|
|
} |
|
|
|
|
|
|
|
List<KeyTreeVO> orgKeyTreeVOList = dingOrganizationList.stream().map(r -> { |
|
|
|
KeyTreeVO keyTreeVO = new KeyTreeVO(); |
|
|
|