diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java index e48dde8..af05a59 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java @@ -29,6 +29,7 @@ import com.ningdatech.pmapi.expert.model.query.ExpertDictionaryQuery; import com.ningdatech.pmapi.expert.model.req.MetaApplyResultRequest; import com.ningdatech.pmapi.expert.model.vo.ExpertApplyMetaVO; import com.ningdatech.pmapi.expert.model.vo.MetaApplyResultVo; +import com.ningdatech.pmapi.expert.service.ExpertAdminManageService; import com.ningdatech.pmapi.expert.service.ExpertInfoService; import com.ningdatech.pmapi.expert.service.IExpertMetaApplyService; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; @@ -79,6 +80,8 @@ public class ExpertMetaApplyManage { private final ExpertUserInfoHelper expertUserInfoHelper; + private final ExpertAdminManageService expertAdminManageService; + public PageVo metaApplyListQuery(MetaApplyListQuery req) { Long expertAdminUserId = LoginUserUtil.getUserId(); @@ -86,10 +89,8 @@ public class ExpertMetaApplyManage { List viewRegions = regionLimitHelper.getExpertAdminContainsRegion(expertAdminUserId); ExpertAdminExpertManageQueryCmd queryCmd = buildExpertAdminExpertManageQueryCmd(req, viewRegions); // TODO -// List filterExpertUserIdList = expertAdminManageService.filterExpertUserIdList(queryCmd); - List expertUserFullInfoList = userFullInfoService.list(); + List filterExpertUserIdList = expertAdminManageService.filterExpertUserIdList(queryCmd); // TODO 获取所有的专家审核列表 - List filterExpertUserIdList = expertUserFullInfoList.stream().map(ExpertUserFullInfo::getUserId).distinct().collect(Collectors.toList()); if (CollUtil.isEmpty(filterExpertUserIdList)) { return PageVo.empty(); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertAdminManageService.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertAdminManageService.java index d8e0e96..cea8862 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertAdminManageService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertAdminManageService.java @@ -21,4 +21,13 @@ public interface ExpertAdminManageService { */ CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd expertAdminExpertManageQueryCmd); + + /** + * 获取所有符合查询条件的专家user_id + * + * @param expertAdminExpertManageQueryCmd + * @return + */ + List filterExpertUserIdList(ExpertAdminExpertManageQueryCmd expertAdminExpertManageQueryCmd); + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java index b72a567..cd10d39 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java @@ -109,4 +109,10 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { } return listExpertQuery; } + + @Override + public List filterExpertUserIdList(ExpertAdminExpertManageQueryCmd queryCmd) { + ListExpertQuery listExpertQuery = buildListExpertQuery(queryCmd); + return expertAdminManageMapper.listExpertUserId(listExpertQuery); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java index f4e66cd..5d7bc7c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java @@ -46,7 +46,7 @@ public class DingOrganizationController { @PostMapping("/get-child-list") @ApiOperation("获取组织架构的树状结构(单位筛选列表)") public List getChildOrganizationList(@RequestParam(value = "parentCode", required = false) String parentCode,@RequestParam(value = "orgName", required = false) String orgName) { - return organizationManage.getChildOrganizationList(parentCode,orgName); + return organizationManage.getChildOrganizationList(parentCode,orgName,false); } @ApiOperation("组织树状列表筛选(前端定制化接口不可复用)") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java index d9d9106..ac4a6f4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java @@ -92,19 +92,21 @@ public class OrganizationManage { return pageVo; } - public List getChildOrganizationList(String parentCode, String orgName) { + public List getChildOrganizationList(String parentCode, String orgName, Boolean onlyUnit) { List parentCodeList = new ArrayList<>(); List dingOrganizationList = new ArrayList<>(); if (StrUtils.isBlank(parentCode)) { parentCodeList = dingOrganizationProperties.getDeptVisibleScopes(); dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) .like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName) + .notIn(onlyUnit, DingOrganization::getTypeCode, "GOV_INTERNAL_INSTITUTION") .in(DingOrganization::getOrganizationCode, parentCodeList)); } else { parentCodeList = CollectionUtil.toList(parentCode); dingOrganizationList = iDingOrganizationService .list(Wrappers.lambdaQuery(DingOrganization.class) .like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName) + .notIn(onlyUnit, DingOrganization::getTypeCode, "GOV_INTERNAL_INSTITUTION") .in(DingOrganization::getParentCode, parentCodeList)); } @@ -173,7 +175,7 @@ public class OrganizationManage { keyTreeVO.setType("ORGANIZATION"); return keyTreeVO; }).collect(Collectors.toList()); - treeVOList(request.getNeedMember(), orgKeyTreeVOList); + treeVOList(request.getNeedMember(), orgKeyTreeVOList,onlyUnit); return orgKeyTreeVOList; } @@ -232,10 +234,10 @@ public class OrganizationManage { } - public void treeVOList(Boolean needMember, List basicOrgKeyTreeVOList) { + public void treeVOList(Boolean needMember, List basicOrgKeyTreeVOList, Boolean onlyUnit) { for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) { String parentCode = basicOrgKeyTreeVO.getKey(); - List childOrganizationList = getChildOrganizationList(parentCode, null); + List childOrganizationList = getChildOrganizationList(parentCode, null, onlyUnit); List orgKeyTreeVOList = childOrganizationList.stream().map(r -> { KeyTreeVO keyTreeVO = new KeyTreeVO();