diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/exception/ReturnException.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/exception/ReturnException.java
new file mode 100644
index 0000000..59848ab
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/exception/ReturnException.java
@@ -0,0 +1,26 @@
+package com.hz.pm.api.common.exception;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * ReturnException
+ *
+ *
+ * @author WendyYang
+ * @since 21:49 2024/6/9
+ */
+@Data
+@AllArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class ReturnException extends RuntimeException {
+
+ private final String message;
+
+ public static ReturnException wrap(String message) {
+ return new ReturnException(message);
+ }
+
+}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/handler/GlobalExceptionHandler.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/handler/GlobalExceptionHandler.java
index 2be359b..dc131f9 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/common/handler/GlobalExceptionHandler.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/handler/GlobalExceptionHandler.java
@@ -1,5 +1,6 @@
package com.hz.pm.api.common.handler;
+import com.hz.pm.api.common.exception.ReturnException;
import com.ningdatech.basic.enumeration.Status;
import com.ningdatech.basic.model.ApiResponse;
import com.ningdatech.basic.util.CollUtils;
@@ -68,4 +69,10 @@ public class GlobalExceptionHandler {
return ApiResponse.of(Status.BAD_REQUEST.getCode(), "系统异常,请联系管理员");
}
+ @ResponseBody
+ @ExceptionHandler(value = ReturnException.class)
+ public ApiResponse returnException(ReturnException e) {
+ return ApiResponse.of(Status.BAD_REQUEST.getCode(), e.getMessage());
+ }
+
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java
index cc6554a..a2dc52a 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java
@@ -48,7 +48,7 @@ public class ExpertInviteHelper {
* @return java.util.List
* @author WendyYang
**/
- public List listInvitedExpertByTime(LocalDateTime start, LocalDateTime end) {
+ public List listInvitedExpertIds(LocalDateTime start, LocalDateTime end) {
LambdaQueryWrapper meetingQuery = Wrappers.lambdaQuery(Meeting.class)
.select(Meeting::getId)
.eq(Meeting::getStatus, MeetingStatusEnum.NORMAL.getCode())
@@ -68,7 +68,7 @@ public class ExpertInviteHelper {
}
public Set listExpertLeaveOrInvited(LocalDateTime start, LocalDateTime end) {
- return new HashSet<>(listInvitedExpertByTime(start, end));
+ return new HashSet<>(listInvitedExpertIds(start, end));
}
public Set getAvoidExpert(List appoints, AvoidRuleDTO avoid, LocalDateTime start, LocalDateTime end) {
@@ -78,7 +78,7 @@ public class ExpertInviteHelper {
.flatMap(w -> Optional.ofNullable(w.getExpertIds()))
.ifPresent(expertIds::addAll);
// 过滤掉请假专家
- expertIds.addAll(listInvitedExpertByTime(start, end));
+ expertIds.addAll(listInvitedExpertIds(start, end));
return expertIds;
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java
index 5745200..4b56920 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java
@@ -1,9 +1,11 @@
package com.hz.pm.api.meeting.helper;
+import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.common.helper.MsgCallHelper;
+import com.hz.pm.api.common.util.EnvironmentUtil;
import com.hz.pm.api.meeting.constant.MeetingMsgTemplateConst;
import com.hz.pm.api.meeting.entity.domain.Meeting;
import com.hz.pm.api.meeting.entity.domain.MeetingExpert;
@@ -24,7 +26,8 @@ import com.hz.pm.api.todocenter.bean.entity.WorkNoticeInfo;
import com.hz.pm.api.user.model.entity.UserInfo;
import com.hz.pm.api.user.service.IUserInfoService;
import com.ningdatech.basic.util.CollUtils;
-import lombok.AllArgsConstructor;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -41,7 +44,7 @@ import java.util.*;
* @since 2023/4/20
**/
@Component
-@AllArgsConstructor
+@RequiredArgsConstructor
public class MeetingNotifyHelper {
private final IUserInfoService userInfoService;
@@ -50,7 +53,13 @@ public class MeetingNotifyHelper {
private final IDingEmployeeInfoService dingEmployeeInfoService;
private final IDingOrganizationService dingOrganizationService;
private final INotifyService notifyService;
+ private final EnvironmentUtil environmentUtil;
+ @Value("${expert-invite.skip-send-call:false}")
+ private Boolean inviteSkipSendCall;
+
+ @Value("${expert-invite.skip-send-sms:false}")
+ private Boolean inviteSkipSendSms;
private static final DateTimeFormatter MEETING_TIME_DTF = DateTimeFormatter.ofPattern("yyyy年M月d日 HH:mm");
private static String officialTime(LocalDateTime time) {
@@ -166,7 +175,12 @@ public class MeetingNotifyHelper {
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()),
meeting.getMeetingAddress());
Set phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile);
- String submitKey = msgCallHelper.sendCall(phones, content, BizTypeEnum.EXPERT_INVITE);
+ String submitKey;
+ if (environmentUtil.isDevEnv() && Boolean.TRUE.equals(inviteSkipSendCall)) {
+ submitKey = UUID.randomUUID().toString(true);
+ } else {
+ submitKey = msgCallHelper.sendCall(phones, content, BizTypeEnum.EXPERT_INVITE);
+ }
experts.forEach(w -> w.setSubmitKey(submitKey));
}
@@ -181,7 +195,12 @@ public class MeetingNotifyHelper {
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()),
meeting.getMeetingAddress());
Set phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile);
- String submitKey = msgCallHelper.sendMsg(phones, content, BizTypeEnum.EXPERT_INVITE);
+ String submitKey;
+ if (environmentUtil.isDevEnv() && Boolean.TRUE.equals(inviteSkipSendSms)) {
+ submitKey = UUID.randomUUID().toString(true);
+ } else {
+ submitKey = msgCallHelper.sendMsg(phones, content, BizTypeEnum.EXPERT_INVITE);
+ }
// 短信发送成功返回的UUID
experts.forEach(w -> w.setSubmitKey(submitKey));
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java
index 2e2410b..2619898 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java
@@ -3,6 +3,7 @@ package com.hz.pm.api.meeting.manage;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.expert.entity.ExpertAvoidCompany;
import com.hz.pm.api.expert.entity.ExpertGovBusinessStrip;
@@ -29,7 +30,6 @@ import com.hz.pm.api.meta.model.entity.ExpertDictionary;
import com.hz.pm.api.meta.model.entity.ExpertTag;
import com.hz.pm.api.meta.service.IExpertDictionaryService;
import com.hz.pm.api.meta.service.IExpertTagService;
-import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.util.CollUtils;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
@@ -79,7 +79,7 @@ public class ExpertInviteManage {
private static final Predicate> COLL_EMPTY = (coll) -> coll != null && coll.isEmpty();
- private LambdaQueryWrapper buildBaseExpertQuery() {
+ private static LambdaQueryWrapper buildBaseExpertQuery() {
return Wrappers.lambdaQuery(ExpertUserFullInfo.class)
.select(ExpertUserFullInfo::getUserId,
ExpertUserFullInfo::getId,
@@ -89,7 +89,7 @@ public class ExpertInviteManage {
ExpertUserFullInfo::getPhoneNo);
}
- private void buildAvoidCompanyAndBusinessStrip(LambdaQueryWrapper query, List units, List strips) {
+ private static void buildAvoidCompanyAndBusinessStrip(LambdaQueryWrapper query, List units, List 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" +
@@ -303,19 +303,18 @@ public class ExpertInviteManage {
if (merge.isSkip()) {
return result;
}
- boolean hasAvoidExpert = CollUtil.isNotEmpty(avoidRule.getExpertIds());
- boolean hasAvoidCompany = CollUtil.isNotEmpty(avoidRule.getAvoidUnitIdList());
- Set avoidCompanyUniqCodes = new HashSet<>();
- if (hasAvoidCompany) {
- avoidCompanyUniqCodes.addAll(avoidRule.getAvoidUnitIdList());
- }
+ Set avoidUnitCodes = new HashSet<>();
+ BizUtils.notEmpty(avoidRule.getAvoidUnitIdList(), avoidUnitCodes::addAll);
+
+ LambdaQueryWrapper query = buildBaseExpertQuery();
+ AvoidTypeEnum avoidType = avoidRule.getAvoidType() == null ? AvoidTypeEnum.NONE : AvoidTypeEnum.getByCode(avoidRule.getAvoidType());
if (CollUtil.isNotEmpty(invitedExpertIds)) {
- List tmpCompanyUniqCodes = expertUserFullInfoService.listCompanyUniqCodeByUserIds(invitedExpertIds);
- avoidCompanyUniqCodes.addAll(tmpCompanyUniqCodes);
+ buildAvoidUnitStripForQuery(invitedExpertIds, avoidType, avoidUnitCodes, query);
}
+ // 处理专家层级
+ addRegionLimit(query, randomRule);
// 回避信息
- LambdaQueryWrapper query = buildBaseExpertQuery();
- query.notIn(!avoidCompanyUniqCodes.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, avoidCompanyUniqCodes);
+ query.notIn(!avoidUnitCodes.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, avoidUnitCodes);
// 处理回避单位与回避条线
buildAvoidCompanyAndBusinessStrip(query, avoidRule.getAvoidUnitIdList(), avoidRule.getAvoidOrgIdList());
Set expertIdsIn = new HashSet<>();
@@ -326,34 +325,24 @@ public class ExpertInviteManage {
expertIdsNotIn.addAll(merge.getExpertIdsNotIn());
}
// 处理回避专家次数
- if (avoidRule.getWeekInviteCount() != null) {
- Integer weekInviteCount = avoidRule.getWeekInviteCount();
+ BizUtils.notNull(avoidRule.getWeekInviteCount(), weekInviteCount -> {
List tmpExpertIdsNotIn = listAgreedUserIdByRecentMeetings(weekInviteCount, recentDays, meetingCreateOn);
expertIdsNotIn.addAll(tmpExpertIdsNotIn);
- }
- // 处理专家层级
- addRegionLimit(query, randomRule);
+ });
+
if (!expertIdsIn.isEmpty()) {
- if (hasAvoidExpert) {
- expertIdsIn.removeIf(w -> avoidRule.getExpertIds().contains(w));
- if (expertIdsIn.isEmpty()) {
- // 字典、标签、履职意向地 筛选出的专家ID移除需要回避的专家ID、如果为空则说明没有符合条件的
- return result;
- }
- }
- if (CollUtil.isNotEmpty(invitedExpertIds)) {
- expertIdsIn.removeIf(invitedExpertIds::contains);
- if (expertIdsIn.isEmpty()) {
- return result;
- }
+ BizUtils.notEmpty(avoidRule.getExpertIds(), w -> expertIdsIn.removeIf(w::contains));
+ BizUtils.notEmpty(invitedExpertIds, w -> expertIdsIn.removeIf(w::contains));
+ if (expertIdsIn.isEmpty()) {
+ return result;
}
// 过滤掉已参加会议的专家
- List expertIdsLockByMeeting = expertInviteHelper.listInvitedExpertByTime(sTime, eTime);
- expertIdsIn.removeIf(expertIdsLockByMeeting::contains);
+ List lockedExpertIds = expertInviteHelper.listInvitedExpertIds(sTime, eTime);
+ expertIdsIn.removeIf(lockedExpertIds::contains);
if (expertIdsIn.isEmpty()) {
return result;
}
- } else if (hasAvoidExpert || CollUtil.isNotEmpty(invitedExpertIds)) {
+ } else if (CollUtil.isNotEmpty(avoidRule.getExpertIds()) || CollUtil.isNotEmpty(invitedExpertIds)) {
Set tmpExpert = expertInviteHelper.getAvoidExpert(invitedExpertIds, avoidRule, sTime, eTime);
expertIdsNotIn.addAll(tmpExpert);
} else {
@@ -365,11 +354,11 @@ public class ExpertInviteManage {
} else if (!expertIdsNotIn.isEmpty()) {
query.notIn(ExpertUserFullInfo::getUserId, expertIdsNotIn);
}
+ // 开始进行专家抽取
List userInfoList = expertUserFullInfoService.list(query);
if (userInfoList.isEmpty()) {
return result;
}
- AvoidTypeEnum avoidType = avoidRule.getAvoidType() == null ? AvoidTypeEnum.CURR_UNIT : AvoidTypeEnum.getByCode(avoidRule.getAvoidType());
switch (avoidType) {
case NONE:
result.setExperts(inviteRandom(userInfoList, expertsByRecentMeeting(), randomRule.getCount()));
@@ -395,6 +384,22 @@ public class ExpertInviteManage {
return result;
}
+ private void buildAvoidUnitStripForQuery(List invitedExpertIds, AvoidTypeEnum avoidType, Set avoidUnitCodes, LambdaQueryWrapper query) {
+ if (AvoidTypeEnum.CURR_UNIT.equals(avoidType)) {
+ List tmpInvitedExperts = expertUserFullInfoService.listByUserIds(invitedExpertIds);
+ Set tmpUnitCodes = CollUtils.fieldSet(tmpInvitedExperts, ExpertUserFullInfo::getCompanyUniqCode);
+ avoidUnitCodes.addAll(tmpUnitCodes);
+ } else if (AvoidTypeEnum.CURR_STRIP.equals(avoidType)) {
+ List expertStrips = expertGovBusinessStripService.listByUserIds(invitedExpertIds);
+ if (CollUtil.isNotEmpty(expertStrips)) {
+ Set businessStripCodes = CollUtils.fieldSet(expertStrips, ExpertGovBusinessStrip::getBusinessStripCode);
+ query.notExists("select 1 from expert_gov_business_strip egbs " +
+ "where egbs.expertUserId = nd_expert_user_full_info.user_id " +
+ "and egbs.business_strip_code in " + BizUtils.inSqlJoin(businessStripCodes));
+ }
+ }
+ }
+
/**
* 专家替换、补充
*
@@ -431,15 +436,14 @@ public class ExpertInviteManage {
}
LambdaQueryWrapper query = buildBaseExpertQuery();
// 设置回避单位
- Set notInCompanyUniqCodeList = new HashSet<>(avoidRule.getAvoidUnitIdList());
+ Set avoidUnitCodes = new HashSet<>(avoidRule.getAvoidUnitIdList());
// 处理回避单位与回避条线
buildAvoidCompanyAndBusinessStrip(query, avoidRule.getAvoidUnitIdList(), avoidRule.getAvoidOrgIdList());
// 处理回避专家次数
- if (avoidRule.getWeekInviteCount() != null) {
- Integer weekInviteCount = avoidRule.getWeekInviteCount();
+ BizUtils.notNull(avoidRule.getWeekInviteCount(), weekInviteCount -> {
List tmpExpertIdsNotIn = listAgreedUserIdByRecentMeetings(weekInviteCount, recentDays, msTime);
expertIdsNotIn.addAll(tmpExpertIdsNotIn);
- }
+ });
// 处理专家层级
addRegionLimit(query, randomRule);
@@ -451,8 +455,8 @@ public class ExpertInviteManage {
return result;
}
}
- List lockExpertIds = expertInviteHelper.listInvitedExpertByTime(msTime, meTime);
- expertIdsIn.removeIf(lockExpertIds::contains);
+ List lockedExpertIds = expertInviteHelper.listInvitedExpertIds(msTime, meTime);
+ expertIdsIn.removeIf(lockedExpertIds::contains);
if (expertIdsIn.isEmpty()) {
return result;
}
@@ -473,19 +477,7 @@ public class ExpertInviteManage {
List agreeOrNoticingExpertIds = CollUtils.fieldList(agreeOrNoticing, MeetingExpert::getExpertId);
if (!agreeOrNoticingExpertIds.isEmpty()) {
expertIdsNotIn.addAll(agreeOrNoticingExpertIds);
- if (AvoidTypeEnum.CURR_UNIT.equals(avoidType)) {
- List agreeOrNoticingUserInfos = expertUserFullInfoService.listByUserIds(agreeOrNoticingExpertIds);
- Set tmpUniqCompanyCodes = CollUtils.fieldSet(agreeOrNoticingUserInfos, ExpertUserFullInfo::getCompanyUniqCode);
- notInCompanyUniqCodeList.addAll(tmpUniqCompanyCodes);
- } else if (AvoidTypeEnum.CURR_STRIP.equals(avoidType)) {
- List expertStrips = expertGovBusinessStripService.listByUserIds(agreeOrNoticingExpertIds);
- if (CollUtil.isNotEmpty(expertStrips)) {
- Set businessStripCodes = CollUtils.fieldSet(expertStrips, ExpertGovBusinessStrip::getBusinessStripCode);
- query.notExists("select 1 from expert_gov_business_strip egbs " +
- "where egbs.expertUserId = nd_expert_user_full_info.user_id " +
- "and egbs.business_strip_code in " + BizUtils.inSqlJoin(businessStripCodes));
- }
- }
+ buildAvoidUnitStripForQuery(agreeOrNoticingExpertIds, avoidType, avoidUnitCodes, query);
}
// 已请假的专家不再抽取
List expertsOnLeave = expertGroupByStatus.get(ON_LEAVE);
@@ -519,7 +511,7 @@ public class ExpertInviteManage {
} else if (hasExpertIdNotIn) {
query.notIn(ExpertUserFullInfo::getUserId, expertIdsNotIn);
}
- query.notIn(!notInCompanyUniqCodeList.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, notInCompanyUniqCodeList);
+ query.notIn(!avoidUnitCodes.isEmpty(), ExpertUserFullInfo::getCompanyUniqCode, avoidUnitCodes);
List userFullInfos = expertUserFullInfoService.list(query);
if (userFullInfos.isEmpty()) {
return result;
@@ -591,7 +583,7 @@ public class ExpertInviteManage {
randomRules.forEach(rule -> {
ExpertChoseDTO tmpExperts = expertInviteByRandomRule(avoidRule, rule, chooseExpertIds, sTime, eTime, createOn);
if (tmpExperts.getTotal() < rule.getCount()) {
- throw BizException.wrap("可抽取专家数量不足");
+ throw ReturnException.wrap("可抽取专家数量不足");
}
expertsByRandom.add(tmpExperts);
chooseExpertIds.addAll(CollUtils.fieldList(tmpExperts.getExperts(), ExpertUserFullInfo::getUserId));
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java
index f0e001e..cd7c12e 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.RegionCacheHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.util.BizUtils;
@@ -126,7 +127,7 @@ public class MeetingManage {
String meetingMd5 = SecureUtil.md5(JSONUtil.toJsonStr(req));
String key = MEETING_CREATE_KEY + meetingMd5;
if (!distributedLock.lock(key, RETRY_TIMES)) {
- throw BizException.wrap("会议正在创建中");
+ throw ReturnException.wrap("会议正在创建中");
}
try {
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail();
@@ -162,22 +163,22 @@ public class MeetingManage {
public void continueInvite(Long meetingId) {
String key = "CONTINUE_INVITE:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
- throw BizException.wrap("已进行续抽,请勿重复点击");
+ throw ReturnException.wrap("已进行续抽,请勿重复点击");
}
try {
Meeting meeting = meetingService.getById(meetingId);
if (!meeting.getInviteStatus()) {
- throw BizException.wrap("该会议正在抽取专家,暂无法续抽");
+ throw ReturnException.wrap("该会议正在抽取专家,暂无法续抽");
}
if (meeting.getStartTime().isBefore(LocalDateTime.now())) {
- throw BizException.wrap("会议已开始,不允许续抽");
+ throw ReturnException.wrap("会议已开始,不允许续抽");
}
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) {
- throw BizException.wrap("续抽失败,请刷新后重试");
+ throw ReturnException.wrap("续抽失败,请刷新后重试");
}
boolean invitedContinue = meetingManageHelper.checkCouldBeInvitedContinue(meetingId);
if (!invitedContinue) {
- throw BizException.wrap("抽取人员数量已满足抽取规则");
+ throw ReturnException.wrap("抽取人员数量已满足抽取规则");
}
expertRandomInviteTask.notifyInviteTask(meetingId);
} finally {
@@ -189,12 +190,12 @@ public class MeetingManage {
public void convertToAppoint(Long meetingId) {
String key = "CONVERT_TO_APPOINT:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
- throw BizException.wrap("已进行转换,请勿重复点击");
+ throw ReturnException.wrap("已进行转换,请勿重复点击");
}
try {
Meeting meeting = meetingService.getById(meetingId);
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) {
- throw BizException.wrap("转换失败,请刷新后重试");
+ throw ReturnException.wrap("转换失败,请刷新后重试");
}
expertRandomInviteTask.cancelByMeetingIdAndKillTask(meetingId);
LambdaUpdateWrapper meetingUpdate = Wrappers.lambdaUpdate(Meeting.class)
@@ -225,7 +226,7 @@ public class MeetingManage {
public void expertInviteByCreate(ExpertInviteReq req) {
String key = INVITED_RULE_CREATE + req.getMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {
- throw BizException.wrap("不可重复进行专家抽取");
+ throw ReturnException.wrap("不可重复进行专家抽取");
}
try {
Meeting meeting = meetingService.getById(req.getMeetingId());
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java
index 3586d59..0f38258 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java
@@ -231,6 +231,11 @@ public class SyncMhUserOrgManage {
}
}
+ /**
+ * 保存评审专家
+ *
+ * @param reviewExperts \
+ */
private void saveReviewExperts(List reviewExperts) {
List expertNos = CollUtils.fieldList(reviewExperts, MhReviewExpertDTO::getExpertNo);
Map expertMap = getExpertsMapMhExpertNo(expertNos);
@@ -306,6 +311,11 @@ public class SyncMhUserOrgManage {
}
+ /**
+ * 保存技术专家
+ *
+ * @param techExperts \
+ */
private void saveTechExperts(List techExperts) {
List expertNos = CollUtils.fieldList(techExperts, MhTechExpertDTO::getExpertNo);
Map expertMap = getExpertsMapMhExpertNo(expertNos);
@@ -328,7 +338,7 @@ public class SyncMhUserOrgManage {
eui.setDegreeCertFile(expert.getFileDegree());
eui.setMhCreateOn(LocalDateTimeUtil.of(expert.getCreateTime()));
eui.setMhCreateBy(expert.getCreateUser());
- BizUtils.notBlank (expert.getInPutTime(),w -> {
+ BizUtils.notBlank(expert.getInPutTime(), w -> {
LocalDateTime inputTime = DateUtil.parse(w).toLocalDateTime();
eui.setInPutTime(inputTime);
});
diff --git a/hz-pm-api/src/main/resources/application-dev.yml b/hz-pm-api/src/main/resources/application-dev.yml
index 1f66ab9..05403fe 100644
--- a/hz-pm-api/src/main/resources/application-dev.yml
+++ b/hz-pm-api/src/main/resources/application-dev.yml
@@ -218,4 +218,8 @@ web:
login:
url: http://hzpm.ningdatech.com
api:
- url: http://hzpm.ningdatech.com/hzpm
\ No newline at end of file
+ url: http://hzpm.ningdatech.com/hzpm
+
+expert-invite:
+ skip-send-call: true
+ skip-send-sms: true
\ No newline at end of file