Browse Source

确认名单修改

master
WendyYang 1 year ago
parent
commit
da2204ae79
4 changed files with 52 additions and 4 deletions
  1. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java
  3. +28
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ConfirmedRosterReq.java
  4. +18
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java View File

@@ -174,11 +174,11 @@ public class MeetingController {
meetingManage.setUpHeadman(req);
}

@ApiOperation("重发短信")
@ApiOperation("重发短信 | 确认名单")
@PostMapping("/confirmedRoster")
@WebLog(value = "重发短信")
public void resendSms(@RequestBody MeetingCancelReq req) {
meetingManage.confirmedRoster(req.getMeetingId());
public void resendSms(@RequestBody ConfirmedRosterReq req) {
meetingManage.confirmedRoster(req);
}

@GetMapping("/listReviewProject")


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java View File

@@ -56,6 +56,9 @@ public class MeetingExpert implements Serializable {
@ApiModelProperty("邀请类型")
private Integer inviteType;

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

private String submitKey;

@TableField(fill = FieldFill.INSERT)


+ 28
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ConfirmedRosterReq.java View File

@@ -0,0 +1,28 @@
package com.ningdatech.pmapi.meeting.entity.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
* <p>
* 会议确认名单实体
* </p>
*
* @author WendyYang
* @since 10:43 2022/8/26
*/
@Data
@ApiModel("会议确认名单实体")
public class ConfirmedRosterReq {

@NotNull(message = "会议ID不能为空")
@ApiModelProperty("会议ID")
private Long meetingId;

@ApiModelProperty
private Boolean reconfirmed;

}

+ 18
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -716,6 +716,7 @@ public class MeetingManage {
}
}

@Transactional(rollbackFor = Exception.class)
public void expertRemove(ExpertRemoveReq req) {
String key = "EXPERT_REMOVE:" + req.getExpertMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {
@@ -736,6 +737,10 @@ public class MeetingManage {
if (!NOTICING.eq(expert.getStatus())) {
throw BizException.wrap("已确认过的专家不允许移除!");
}
LambdaUpdateWrapper<Meeting> mUpdate = Wrappers.lambdaUpdate(Meeting.class)
.set(Meeting::getConfirmedRoster, false)
.eq(Meeting::getId, req.getMeetingId());
meetingService.update(mUpdate);
meetingExpertService.removeById(req.getExpertMeetingId());
} finally {
distributedLock.releaseLock(key);
@@ -791,7 +796,8 @@ public class MeetingManage {
}
}

public void confirmedRoster(Long meetingId) {
public void confirmedRoster(ConfirmedRosterReq req) {
Long meetingId = req.getMeetingId();
String key = "MEETING_RESEND_SMS:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("请刷新后重试!");
@@ -809,6 +815,17 @@ public class MeetingManage {
meetingService.update(update);
}
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId);
List<MeetingExpert> expertNoticing = experts.stream()
.filter(w -> meeting.getConfirmedRoster() || !w.getConfirmedRoster())
.collect(Collectors.toList());
if (expertNoticing.isEmpty()) {
return;
}
List<Long> currConfirmedMeIds = CollUtils.fieldList(expertNoticing, MeetingExpert::getId);
LambdaUpdateWrapper<MeetingExpert> meUpdate = Wrappers.lambdaUpdate(MeetingExpert.class)
.in(MeetingExpert::getId, currConfirmedMeIds)
.set(MeetingExpert::getConfirmedRoster, Boolean.TRUE);
meetingExpertService.update(meUpdate);
// TODO 发送会议通知
} finally {
distributedLock.releaseLock(key);


Loading…
Cancel
Save