diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java index 8a68850..e9f2d70 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java @@ -1,6 +1,10 @@ package com.ningdatech.pmapi.meeting.controller; +import cn.hutool.core.io.FileUtil; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; import com.ningdatech.basic.model.IdVo; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; @@ -14,6 +18,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; /** *
@@ -67,17 +74,17 @@ public class MeetingController { } @ApiOperation("会议详情-基本信息") - @GetMapping("detail/{meetingId}/basicInfo") + @GetMapping("/basicInfo/{meetingId}") @WebLog(value = "会议详情-基本信息") public MeetingDetailBasicVO meetingBasic(@PathVariable Long meetingId) { return meetingManage.getMeetingDetail(meetingId); } - @ApiOperation("邀请情况详情") - @GetMapping("/detail/{meetingId}/inviteDetail") + @ApiOperation("抽取情况") + @GetMapping("/inviteExpertList/{meetingId}") @WebLog(value = "邀请情况详请") - public ExpertInviteDetailVO inviteDetail(@PathVariable Long meetingId) { - return meetingManage.inviteDetail(meetingId); + public ExpertInviteDetailVO inviteExpertList(@PathVariable Long meetingId) { + return meetingManage.inviteExpertList(meetingId); } @ApiOperation("会议基础信息修改") @@ -88,33 +95,17 @@ public class MeetingController { } @ApiOperation("会议详情-抽取规则") - @GetMapping("/detail/inviteRule/{meetingId}") + @GetMapping("/inviteRuleDetail/{meetingId}") @WebLog(value = "会议详情-抽取规则") public InviteRuleDetailVO inviteRuleDetail(@PathVariable Long meetingId) { return meetingManage.inviteRuleDetail(meetingId); } - @ApiOperation("专家移除") - @PostMapping("/expertRemove") - @WebLog(value = "专家移除") - public void expertRemove(@RequestBody ExpertRemoveReq po) { - meetingManage.expertRemove(po); - } - @ApiOperation("专家替换") @PostMapping("/expertReplace") @WebLog(value = "专家替换") public void expertReplace(@RequestBody ExpertRemoveReq po) { meetingManage.expertReplace(po); - - } - - @ApiOperation("确认名单(下发会议通知)") - @GetMapping("/sendMeetingNotice/{meetingId}") - @WebLog(value = "确认名单(下发会议通知") - public void sendMeetingNotice(@PathVariable Long meetingId) { - meetingManage.sendMeetingNotice(meetingId); - } @ApiOperation("停止抽取") @@ -122,7 +113,6 @@ public class MeetingController { @WebLog(value = "停止抽取") public void stopInvite(@PathVariable Long meetingId) { meetingManage.stopRandomInvite(meetingId); - } @ApiOperation("取消会议") @@ -133,10 +123,10 @@ public class MeetingController { } @ApiOperation("邀请函信息") - @GetMapping("/expertInvitationDetail") + @GetMapping("/expertInviteDetail") @WebLog(value = "邀请函信息") - public ExpertInvitationDetailVO expertInvitationDetail(@RequestParam("meetingId") Long meetingId, - @RequestParam(required = false) Long expertId) { + public ExpertInvitationDetailVO expertInvitationDetail(@RequestParam(required = false) Long expertId, + @RequestParam Long meetingId) { return meetingManage.expertInvitationDetail(meetingId, expertId); } @@ -148,10 +138,33 @@ public class MeetingController { } @ApiOperation("确认参加") - @PostMapping("/confirmAttendByManager") + @PostMapping("/expert/confirm") @WebLog(value = "确认参加") - public void confirmAttendByManager(@RequestBody ExpertRemoveReq po) { - meetingManage.confirmAttendByManager(po); + public void confirmAttendByManager(@RequestBody ExpertConfirmReq req) { + meetingManage.confirmAttendByManager(req); } + @ApiOperation("释放专家") + @PostMapping("/expert/release") + @WebLog(value = "释放专家") + public void releaseExperts(@RequestBody MeetingCancelReq req) { + meetingManage.releaseExperts(req); + } + + @ApiOperation("设置专家组长") + @PostMapping("setUpHeadman") + @WebLog(value = "设置专家组长") + public void setUpHeadman(@RequestBody ExpertConfirmReq req){ + meetingManage.setUpHeadman(req); + } + + @ApiOperation("重发短信") + @PostMapping("/confirmedRoster") + @WebLog(value = "重发短信") + public void resendSms(MeetingCancelReq req){ + meetingManage.confirmedRoster(req.getMeetingId()); + } + + + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java deleted file mode 100644 index ba8ca99..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.meeting.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *
- * 会议评审内部项目表 前端控制器 - *
- * - * @author WendyYang - * @since 2023-02-28 - */ -@Controller -@RequestMapping("/pmapi.meeting/meeting-inner-project") -public class MeetingInnerProjectController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java deleted file mode 100644 index 7956aa4..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.meeting.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *- * 会议评审外部项目 前端控制器 - *
- * - * @author WendyYang - * @since 2023-02-28 - */ -@Controller -@RequestMapping("/pmapi.meeting/meeting-outer-project") -public class MeetingOuterProjectController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java index c3c42a2..5ab5301 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java @@ -54,22 +54,6 @@ public class Meeting implements Serializable { @ApiModelProperty("联系方式") private String contact; - @ApiModelProperty("创建人ID") - @TableField(fill = FieldFill.INSERT) - private Long createBy; - - @ApiModelProperty("创建时间") - @TableField(fill = FieldFill.INSERT) - private LocalDateTime createOn; - - @ApiModelProperty("修改人ID") - @TableField(fill = FieldFill.INSERT_UPDATE) - private Long updateBy; - - @ApiModelProperty("修改时间") - @TableField(fill = FieldFill.INSERT_UPDATE) - private LocalDateTime updateOn; - @ApiModelProperty("创建人") private String creator; @@ -81,6 +65,9 @@ public class Meeting implements Serializable { @ApiModelProperty("是否停止随机邀请") private Boolean inviteStopped; + @ApiModelProperty("是否确认名单") + private Boolean confirmedRoster; + @ApiModelProperty("举办单位") private String holdOrg; @@ -90,4 +77,20 @@ public class Meeting implements Serializable { @ApiModelProperty("是否为内部项目") private Boolean isInnerProject; + @ApiModelProperty("创建人ID") + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + @ApiModelProperty("创建时间") + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createOn; + + @ApiModelProperty("修改人ID") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updateBy; + + @ApiModelProperty("修改时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private LocalDateTime updateOn; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java index ce7f9a1..e8cf1aa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java @@ -47,9 +47,14 @@ public class MeetingExpert implements Serializable { private String mobile; + private String expertName; + @ApiModelProperty("当前状态") private Integer status; + @ApiModelProperty("是否是专家组长") + private Boolean isHeadman; + @ApiModelProperty("前一个状态") private Integer preStatus; @@ -68,6 +73,5 @@ public class MeetingExpert implements Serializable { private String submitKey; - private String expertName; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java index aff3615..f53606f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java @@ -18,14 +18,15 @@ import java.util.Arrays; public enum ExpertAttendStatusEnum { NOTICING("通知中", 0), - NOT_ANSWERED("未应答", 1), + UNANSWERED("未应答", 1), REPLACED("已替换", 2), AGREED("同意参加", 3), REFUSED("拒绝参加", 4), - CANCELED("已移除", 5), - ON_LEAVE("已请假", 6); + REMOVED("已移除", 5), + ON_LEAVE("已请假", 6), + RELEASED("已释放", 7); - private final String desc; + private final String value; private final Integer code; public boolean eq(Integer code) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermType.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermTypeEnum.java similarity index 64% rename from pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermType.java rename to pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermTypeEnum.java index f846be9..d209ce5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermType.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermTypeEnum.java @@ -1,32 +1,32 @@ package com.ningdatech.pmapi.meeting.entity.enumeration; +import lombok.AllArgsConstructor; import lombok.Getter; import java.util.Arrays; /** *- * MeetingDateTermType-会议日期类型 + * MeetingDateTermType *
* * @author WendyYang * @since 09:54 2022/8/15 */ @Getter -public enum MeetingDateTermType { +@AllArgsConstructor +public enum MeetingDateTermTypeEnum { + /** + * 会议日期类型 + */ ONE_DAY(1, "一天"), MORE_THAN_ONE(2, "两天及以上"); private final Integer code; - private final String name; + private final String value; - MeetingDateTermType(Integer code, String name) { - this.code = code; - this.name = name; - } - - public static MeetingDateTermType getByCode(Integer code) { + public static MeetingDateTermTypeEnum getByCode(Integer code) { return Arrays.stream(values()) .filter(w -> w.getCode().equals(code)) .findFirst() diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ExpertConfirmReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ExpertConfirmReq.java new file mode 100644 index 0000000..245eb1e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ExpertConfirmReq.java @@ -0,0 +1,29 @@ +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; + +/** + *+ * 确认参加参数类 + *
+ * + * @author WendyYang + * @since 08:59 2022/8/10 + */ +@Data +@ApiModel("确认参加") +public class ExpertConfirmReq { + + @NotNull(message = "会议ID不能为空") + @ApiModelProperty("会议ID") + private Long meetingId; + + @NotNull(message = "专家会议ID不能为空") + @ApiModelProperty("专家会议ID") + private Long expertMeetingId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertIdReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertIdReq.java new file mode 100644 index 0000000..2291f2c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertIdReq.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meeting.entity.req; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *+ * MeetingExpertIdReq + *
+ * + * @author WendyYang + * @since 14:11 2023/3/3 + */ +@Data +public class MeetingExpertIdReq { + + @ApiModelProperty("专家会议ID") + private Long expertMeetingId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java index acb2d20..6b8b442 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java @@ -3,13 +3,12 @@ package com.ningdatech.pmapi.meeting.entity.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.EqualsAndHashCode; import java.util.List; /** *- * ExpertInviteDetailVo + * ExpertInviteDetailVO *
* * @author WendyYang @@ -19,73 +18,13 @@ import java.util.List; @ApiModel("专家邀请情况实体") public class ExpertInviteDetailVO { - @Data - @EqualsAndHashCode(callSuper = true) - @ApiModel("最终参与名单实体") - public static class ExpertAttendListItemVO extends ExpertBasicInfoVO { - - private Long meetingId; - - private Long expertMeetingId; - - @ApiModelProperty("邀请方式") - private String inviteType; - - } - - @Data - @EqualsAndHashCode(callSuper = true) - @ApiModel("随机邀请名单实体") - public static class RandomInviteListItemVO extends ExpertBasicInfoVO { - - @ApiModelProperty("会议ID") - private Long meetingId; - - @ApiModelProperty("专家会议ID") - private Long expertMeetingId; - - @ApiModelProperty("电话通知状态") - private String noticeStatus; - - @ApiModelProperty("邀请结果") - private String confirmResult; - - @ApiModelProperty("邀请状态") - private Integer status; - - } - - @ApiModelProperty("参与数量总计") - private Integer attendTotal; - - @ApiModelProperty("随机邀请参与数量") - private Integer randomAttend; - - @ApiModelProperty("指定邀请参与数量") - private Integer appointAttend; - @ApiModelProperty("是否已停止邀请") private Boolean invitedStopped; - @ApiModelProperty("最终参与名单") - private List+ * RandomInviteListItemVO + *
+ * + * @author WendyYang + * @since 16:48 2023/3/3 + */ +@Data +@ApiModel("邀请名单实体") +@EqualsAndHashCode(callSuper = true) +public class RandomInviteListItemVO extends ExpertBasicInfoVO { + + @ApiModelProperty("会议ID") + private Long meetingId; + + @ApiModelProperty("专家会议ID") + private Long expertMeetingId; + + @ApiModelProperty("电话通知状态") + private String noticeStatus; + + @ApiModelProperty("邀请结果") + private String confirmResult; + + @ApiModelProperty("邀请状态") + private Integer status; + +} \ No newline at end of file diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java index f36b91e..fcaf5d6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java @@ -17,7 +17,6 @@ import com.ningdatech.pmapi.meeting.entity.dto.AvoidInfoDTO; import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO; import com.ningdatech.pmapi.meeting.entity.dto.MeetingBasicDTO; import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; -import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum; import com.ningdatech.pmapi.meeting.entity.req.MeetingListReq; import com.ningdatech.pmapi.meeting.entity.vo.ExpertBasicInfoVO; import com.ningdatech.pmapi.meeting.entity.vo.MeetingByManagerVO; @@ -184,13 +183,13 @@ public class MeetingManageHelper { switch (ExpertAttendStatusEnum.getByCode(w.getStatus())) { case REFUSED: throw BizException.wrap("专家%s已拒绝参加", expertName); - case CANCELED: + case REMOVED: throw BizException.wrap("专家%s已被移除", expertName); case REPLACED: switch (ExpertAttendStatusEnum.getByCode(w.getPreStatus())) { case REFUSED: throw BizException.wrap("专家%s已拒绝参加", expertName); - case CANCELED: + case REMOVED: throw BizException.wrap("专家%s已被移除", expertName); default: break; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java index f3705e7..f4c58e3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java @@ -409,7 +409,7 @@ public class ExpertInviteManage { removeExpertIds.addAll(tempRefused); }); // 被取消的也不可以被再次抽中 - BizUtils.notEmpty(expertIdGroupByStatus.get(ExpertAttendStatusEnum.CANCELED), w -> { + BizUtils.notEmpty(expertIdGroupByStatus.get(ExpertAttendStatusEnum.REMOVED), w -> { List