Browse Source

modify:

1. 增加是否允许重新提交变更字段;
2. 会议评审结果上传去除会议未结束限制;
3. 确认名单记录短信通知标识;
4. 专家邀请情况增加确认名单短信回复内容;
tags/24101601
WendyYang 2 months ago
parent
commit
fa2126c931
5 changed files with 51 additions and 5 deletions
  1. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/common/helper/MsgCallHelper.java
  2. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/domain/MeetingExpert.java
  3. +4
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/vo/InviteExpertListItemVO.java
  4. +8
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java
  5. +35
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java

+ 1
- 0
hz-pm-api/src/main/java/com/hz/pm/api/common/helper/MsgCallHelper.java View File

@@ -97,6 +97,7 @@ public class MsgCallHelper {
if (SendStatus.SUCCESS.equals(mcr.getSendStatus())) {
switch (bizType) {
case EXPERT_INVITE:
case MEETING_ROSTER_CONFIRM:
mcr.setNeedReply(Boolean.TRUE);
mcr.setReplyStatus(ReplyStatus.WAITING);
break;


+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/domain/MeetingExpert.java View File

@@ -92,4 +92,7 @@ public class MeetingExpert implements Serializable {
@ApiModelProperty("专家签到地点")
private String signAddress;

@ApiModelProperty("确认名单短信通知标识")
private String confirmedRosterMsgSubmitKey;

}

+ 4
- 0
hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/vo/InviteExpertListItemVO.java View File

@@ -62,6 +62,10 @@ public class InviteExpertListItemVO extends ExpertBasicInfoVO {
@ApiModelProperty("专家签到地点")
private String signAddress;

@ApiModelProperty("是否已确认名单")
private Boolean confirmedRoster;

@ApiModelProperty("确认名单短信回复内容")
private String confirmedRosterReplyContent;

}

+ 8
- 1
hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingNotifyHelper.java View File

@@ -27,6 +27,7 @@ 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.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -43,6 +44,7 @@ import java.util.*;
* @author WendyYang
* @since 2023/4/20
**/
@Slf4j
@Component
@RequiredArgsConstructor
public class MeetingNotifyHelper {
@@ -135,7 +137,12 @@ public class MeetingNotifyHelper {
w.getExpertName(), officialTime(w.getCreateOn()), meetingTime, meeting.getMeetingAddress(),
meeting.getConnecter(), meeting.getContact());
// 音信通消息
msgCallHelper.sendMsg(w.getMobile(), msgContent, BizTypeEnum.MEETING_ROSTER_CONFIRM);
try {
String submitKey = msgCallHelper.sendMsg(w.getMobile(), msgContent, BizTypeEnum.MEETING_ROSTER_CONFIRM);
w.setConfirmedRosterMsgSubmitKey(submitKey);
} catch (Exception e) {
log.error("确认名单失败:{}", w.getMobile(), e);
}
UserInfo info = userMap.get(w.getExpertId());
// 发送工作通知
if (info.getAccountId() != null) {


+ 35
- 4
hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java View File

@@ -49,6 +49,9 @@ import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.sys.model.dto.RegionDTO;
import com.hz.pm.api.sys.model.entity.MsgCallRecord;
import com.hz.pm.api.sys.model.enumeration.SubmitTypeEnum;
import com.hz.pm.api.sys.service.IMsgCallRecordService;
import com.hz.pm.api.user.helper.MhUnitCache;
import com.hz.pm.api.user.model.entity.UserInfo;
import com.hz.pm.api.user.model.enumeration.RoleEnum;
@@ -112,6 +115,7 @@ public class MeetingManage {
private final EnvironmentUtil environmentUtil;
private final MhUnitCache mhUnitCache;
private final ProjectStateMachineUtil projectStateMachineUtil;
private final IMsgCallRecordService msgCallRecordService;

private static final String INVITED_RULE_CREATE = "INVITED_RULE_CREATE:";

@@ -543,12 +547,31 @@ public class MeetingManage {
if (experts.isEmpty()) {
return result;
}
List<Long> expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId);
List<String> confirmedRosterSubmitKeys = new ArrayList<>();
List<Long> expertIds = CollUtils.fieldList(experts, w -> {
if (StrUtil.isNotBlank(w.getConfirmedRosterMsgSubmitKey())) {
confirmedRosterSubmitKeys.add(w.getConfirmedRosterMsgSubmitKey());
}
return w.getExpertId();
});
Map<String, String> confirmedRosterReplyMap = new HashMap<>();
if (!confirmedRosterSubmitKeys.isEmpty()) {
Wrapper<MsgCallRecord> query = Wrappers.lambdaQuery(MsgCallRecord.class)
.select(MsgCallRecord::getSubmitKey, MsgCallRecord::getReplyContent)
.eq(MsgCallRecord::getSubmitType, SubmitTypeEnum.SMS)
.in(MsgCallRecord::getSubmitKey, confirmedRosterSubmitKeys);
List<MsgCallRecord> msgCallRecords = msgCallRecordService.list(query);
for (MsgCallRecord msgCallRecord : msgCallRecords) {
confirmedRosterReplyMap.put(msgCallRecord.getSubmitKey(), msgCallRecord.getReplyContent());
}
}
Map<Long, ExpertBasicInfoVO> expertMap = meetingManageHelper.getExpertBasicInfo(expertIds);
BiFunction<MeetingExpert, Map<Long, ExpertInviteRule>, InviteExpertListItemVO> mapping = (me, ruleMap) -> {
ExpertBasicInfoVO expert = expertMap.get(me.getExpertId());
InviteExpertListItemVO item = BeanUtil.copyProperties(expert, InviteExpertListItemVO.class);
item.setExpertMeetingId(me.getId());
item.setConfirmedRoster(me.getConfirmedRoster());
item.setConfirmedRosterReplyContent(confirmedRosterReplyMap.get(me.getConfirmedRosterMsgSubmitKey()));
item.setMeetingId(me.getMeetingId());
item.setStatus(me.getStatus());
item.setStatusName(ExpertAttendStatusEnum.getValByCode(me.getStatus()));
@@ -910,13 +933,21 @@ public class MeetingManage {
return;
}
List<Long> currConfirmedMeIds = CollUtils.fieldList(expertNoticing, MeetingExpert::getId);
Wrapper<MeetingExpert> meUpdate = Wrappers.lambdaUpdate(MeetingExpert.class)
.in(MeetingExpert::getId, currConfirmedMeIds)
LambdaUpdateWrapper<MeetingExpert> meUpdate = Wrappers.lambdaUpdate(MeetingExpert.class)
.set(MeetingExpert::getConfirmedRoster, Boolean.TRUE);
meetingExpertService.update(meUpdate);
if (environmentUtil.isProdEnv()) {
meetingNotifyHelper.sendConfirmedRosterMsg(expertNoticing, meeting);
for (MeetingExpert expert : expertNoticing) {
if (StrUtil.isBlank(expert.getConfirmedRosterMsgSubmitKey())) {
currConfirmedMeIds.remove(expert.getId());
}
}
if (currConfirmedMeIds.isEmpty()) {
throw ReturnException.wrap("参会通知短信发送失败,请重试!");
}
}
meUpdate.in(MeetingExpert::getId, currConfirmedMeIds);
meetingExpertService.update(meUpdate);
} finally {
distributedLock.releaseLock(key);
}


Loading…
Cancel
Save