|
@@ -83,6 +83,19 @@ public class ExpertInviteManage { |
|
|
.eq(ExpertUserFullInfo::getExpertAccountStatus, ExpertAccountStatusEnum.AVAILABLE.getKey()); |
|
|
.eq(ExpertUserFullInfo::getExpertAccountStatus, ExpertAccountStatusEnum.AVAILABLE.getKey()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildAvoidCompanyAndBusinessStrip(LambdaQueryWrapper<ExpertUserFullInfo> query, List<String> units, List<String> strips) { |
|
|
|
|
|
if (CollUtil.isNotEmpty(units)) { |
|
|
|
|
|
String unitStr = BizUtils.inSqlJoin(units); |
|
|
|
|
|
query.notExists("select 1 from expert_avoid_company eac where eac.user_id = nd_expert_user_full_info.user_id" + |
|
|
|
|
|
" and company_uniq_code in " + unitStr); |
|
|
|
|
|
} |
|
|
|
|
|
if (CollUtil.isNotEmpty(strips)) { |
|
|
|
|
|
String orgStr = BizUtils.inSqlJoin(strips); |
|
|
|
|
|
query.notExists("select 1 from expert_gov_business_strip egbs where egbs.expert_user_id = nd_expert_user_full_info.user_id" + |
|
|
|
|
|
" and business_strip_code in " + orgStr); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 增加专家层级限制 |
|
|
* 增加专家层级限制 |
|
|
* |
|
|
* |
|
@@ -272,10 +285,8 @@ public class ExpertInviteManage { |
|
|
// 回避信息 |
|
|
// 回避信息 |
|
|
LambdaQueryWrapper<ExpertUserFullInfo> query = buildBaseExpertQuery(); |
|
|
LambdaQueryWrapper<ExpertUserFullInfo> query = buildBaseExpertQuery(); |
|
|
query.notIn(!tmpAvoidCompany.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, tmpAvoidCompany); |
|
|
query.notIn(!tmpAvoidCompany.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, tmpAvoidCompany); |
|
|
if (avoidCompany) { |
|
|
|
|
|
query.notExists("select 1 from expert_avoid_company eac where eac.user_id = nd_expert_user_full_info.user_id" + |
|
|
|
|
|
" and company_uniq_code in ({0})", CollUtils.joinByComma(avoidRule.getAvoidUnitIdList())); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 处理回避单位与回避条线 |
|
|
|
|
|
buildAvoidCompanyAndBusinessStrip(query, avoidRule.getAvoidUnitIdList(), avoidRule.getAvoidOrgIdList()); |
|
|
Set<Long> expertIdsIn = new HashSet<>(); |
|
|
Set<Long> expertIdsIn = new HashSet<>(); |
|
|
Set<Long> expertIdsNotIn = new HashSet<>(); |
|
|
Set<Long> expertIdsNotIn = new HashSet<>(); |
|
|
if (CollUtil.isNotEmpty(merge.getExpertIdsIn())) { |
|
|
if (CollUtil.isNotEmpty(merge.getExpertIdsIn())) { |
|
@@ -365,8 +376,8 @@ public class ExpertInviteManage { |
|
|
LambdaQueryWrapper<ExpertUserFullInfo> query = buildBaseExpertQuery(); |
|
|
LambdaQueryWrapper<ExpertUserFullInfo> query = buildBaseExpertQuery(); |
|
|
// 设置回避单位 |
|
|
// 设置回避单位 |
|
|
Set<String> notInCompanyUniqCodeList = new HashSet<>(avoidRule.getAvoidUnitIdList()); |
|
|
Set<String> notInCompanyUniqCodeList = new HashSet<>(avoidRule.getAvoidUnitIdList()); |
|
|
query.notExists("select 1 from expert_avoid_company eac where eac.user_id = nd_expert_user_full_info.user_id" + |
|
|
|
|
|
" and company_uniq_code in ({0})", CollUtils.joinByComma(avoidRule.getAvoidUnitIdList())); |
|
|
|
|
|
|
|
|
// 处理回避单位与回避条线 |
|
|
|
|
|
buildAvoidCompanyAndBusinessStrip(query, avoidRule.getAvoidUnitIdList(), avoidRule.getAvoidOrgIdList()); |
|
|
// 处理专家层级 |
|
|
// 处理专家层级 |
|
|
addRegionLimit(query, randomRule); |
|
|
addRegionLimit(query, randomRule); |
|
|
|
|
|
|
|
|