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