From a8910f7d0197bdc2f6ad2d656211b8ba90616151 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 28 Feb 2023 17:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BC=9A=E8=AE=AE=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/GeneratorCodeKingbaseConfig.java | 4 +- .../meeting/controller/MeetingController.java | 26 ++------ .../controller/MeetingInnerProjectController.java | 20 ++++++ .../controller/MeetingOuterProjectController.java | 20 ++++++ .../meeting/entity/domain/MeetingInnerProject.java | 37 +++++++++++ .../meeting/entity/domain/MeetingOuterProject.java | 61 +++++++++++++++++ .../pmapi/meeting/entity/dto/MeetingBasicDTO.java | 7 ++ .../entity/dto/MeetingReviewProjectDTO.java | 32 +++++++++ .../pmapi/meeting/helper/ExpertInviteHelper.java | 18 +---- .../pmapi/meeting/helper/MeetingManageHelper.java | 9 +++ .../pmapi/meeting/manage/MeetingManage.java | 76 +++++++++++----------- .../meeting/mapper/MeetingInnerProjectMapper.java | 16 +++++ .../meeting/mapper/MeetingInnerProjectMapper.xml | 5 ++ .../meeting/mapper/MeetingOuterProjectMapper.java | 16 +++++ .../meeting/mapper/MeetingOuterProjectMapper.xml | 5 ++ .../service/IMeetingInnerProjectService.java | 16 +++++ .../service/IMeetingOuterProjectService.java | 16 +++++ .../impl/MeetingInnerProjectServiceImpl.java | 20 ++++++ .../impl/MeetingOuterProjectServiceImpl.java | 20 ++++++ 19 files changed, 346 insertions(+), 78 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingInnerProject.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingOuterProject.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index e55478e..05cf414 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -46,7 +46,7 @@ public class GeneratorCodeKingbaseConfig { path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); }) .strategyConfig(builder -> { - builder.addTablePrefix("wflow"); + builder.addTablePrefix(""); // 设置需要生成的表名 builder.addInclude(tableNames); }) @@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig { } public static void main(String[] args) { - generate("Liuxinxin", "expert", PATH_LXX, "expert_avoid_company"); + generate("WendyYang", "meeting", PATH_YYD, "meeting_inner_project","meeting_outer_project"); } } 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 4ca4885..991c528 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 @@ -4,7 +4,6 @@ package com.ningdatech.pmapi.meeting.controller; import com.ningdatech.basic.model.IdVo; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; -import com.ningdatech.pmapi.meeting.entity.dto.MeetingBasicDTO; import com.ningdatech.pmapi.meeting.entity.req.*; import com.ningdatech.pmapi.meeting.entity.vo.*; import com.ningdatech.pmapi.meeting.manage.MeetingManage; @@ -33,15 +32,15 @@ public class MeetingController { private final MeetingManage meetingManage; - @PostMapping("/save") - @ApiOperation("新建会议") + @PostMapping("/create") + @ApiOperation(value = "新建会议") @WebLog(value = "新建会议") public IdVo meetingCreate(@Valid @RequestBody MeetingCreateReq req) { - return meetingManage.save(req); + return meetingManage.meetingCreateAndInviteExpert(req); } @PostMapping("/expertInviteByCreate") - @ApiOperation("新建会议-专家抽取") + @ApiOperation(value = "新建会议-专家抽取", hidden = true) @WebLog(value = "新建会议-专家抽取") public void expertInviteByCreate(@Valid @RequestBody ExpertInviteReq po) { meetingManage.expertInviteByCreate(po); @@ -53,7 +52,7 @@ public class MeetingController { return meetingManage.expertCountOnChange(po); } - @ApiOperation("专家抽取员事务列表") + @ApiOperation("专家抽取员会议列表") @GetMapping("/meetingListByManager") @WebLog(value = "专家抽取员事务列表") public PageVo meetingListByManager(MeetingListReq po) { @@ -74,21 +73,6 @@ public class MeetingController { return meetingManage.getMeetingBasicInfo(meetingId); } - @ApiOperation("会议结果上传") - @PostMapping("/uploadMeetingResult") - @WebLog(value = "会议结果上传") - public void uploadMeetingResult(@Valid @RequestBody MeetingResultReq po) { - meetingManage.uploadMeetingResult(po); - - } - - @ApiOperation("会议结果详情") - @GetMapping("/detail/{meetingId}/meetingResult") - @WebLog(value = "会议结果详情况") - public MeetingResultVO meetingResultDetail(@PathVariable Long meetingId) { - return meetingManage.meetingResultDetail(meetingId); - } - @ApiOperation("邀请情况详情") @GetMapping("/detail/{meetingId}/inviteDetail") @WebLog(value = "邀请情况详请") 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 new file mode 100644 index 0000000..ba8ca99 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java @@ -0,0 +1,20 @@ +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 new file mode 100644 index 0000000..7956aa4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java @@ -0,0 +1,20 @@ +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/MeetingInnerProject.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingInnerProject.java new file mode 100644 index 0000000..64ae07b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingInnerProject.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.meeting.entity.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 会议评审内部项目表 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +@Data +@TableName("meeting_inner_project") +@ApiModel(value = "MeetingInnerProject对象", description = "会议评审内部项目表") +public class MeetingInnerProject implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("会议ID") + private Long meetingId; + + @ApiModelProperty("项目ID") + private Long projectId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingOuterProject.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingOuterProject.java new file mode 100644 index 0000000..1aa86b2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingOuterProject.java @@ -0,0 +1,61 @@ +package com.ningdatech.pmapi.meeting.entity.domain; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 会议评审外部项目 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +@Data +@TableName("meeting_outer_project") +@ApiModel(value = "MeetingOuterProject对象", description = "会议评审外部项目") +public class MeetingOuterProject implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("申报单位") + private String buildOrg; + + @ApiModelProperty("项目类型") + private String projectType; + + @ApiModelProperty("预算年度") + private Integer projectYear; + + @ApiModelProperty("申报金额") + private BigDecimal declareAmount; + + @ApiModelProperty("会议ID") + private Long meetingId; + + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createOn; + + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updateBy; + + @TableField(fill = FieldFill.INSERT_UPDATE) + private LocalDateTime updateOn; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java index 4fc0204..ad48603 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java @@ -8,6 +8,7 @@ import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; +import java.util.List; /** *

@@ -59,4 +60,10 @@ public class MeetingBasicDTO { @ApiModelProperty("联系方式") private String contact; + @ApiModelProperty("内部项目ID") + private List projectIdList; + + @ApiModelProperty("外部项目") + private List projects; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java new file mode 100644 index 0000000..41ac6e2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java @@ -0,0 +1,32 @@ +package com.ningdatech.pmapi.meeting.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * MeetingEvalProjectDTO + *

+ * + * @author WendyYang + * @since 17:18 2023/2/28 + */ +@Data +public class MeetingReviewProjectDTO { + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("预算年度") + private Integer projectYear; + + @ApiModelProperty("项目类型") + private String projectType; + + @ApiModelProperty("申报金额") + private String declareAmount; + + @ApiModelProperty("申报单位") + private String buildOrg; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/ExpertInviteHelper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/ExpertInviteHelper.java index dd4288c..91789ca 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/ExpertInviteHelper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/ExpertInviteHelper.java @@ -87,26 +87,12 @@ public class ExpertInviteHelper { return expertIds; } - public Map checkAppointExpert(AppointInviteRuleDTO appointRule, AvoidInfoDTO avoidRule) { + public Map checkAppointExpert(AppointInviteRuleDTO appointRule) { if (appointRule == null) { return Collections.emptyMap(); } List expertInfos = expertUserFullInfoService.listByUserId(appointRule.getExpertIds()); - Map infoMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); - if (avoidRule == null) { - return infoMap; - } - infoMap.forEach((key, userFullInfo) -> { - if (CollectionUtils.isNotEmpty(avoidRule.getExpertIds())) { - boolean contains = avoidRule.getExpertIds().contains(key); - Assert.isTrue(!contains, "已回避的专家不可被指定邀请"); - } - if (CollUtil.isNotEmpty(avoidRule.getAvoidUnitIdList())) { - boolean contains = avoidRule.getAvoidUnitIdList().contains(userFullInfo.getCompany()); - Assert.isTrue(!contains, "回避单位的专家不可出现在指定邀请名单中"); - } - }); - return infoMap; + return CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); } /** 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 6740e4e..030b0a7 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 @@ -15,6 +15,7 @@ import com.ningdatech.pmapi.meeting.entity.domain.Meeting; import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; 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.ExpertAttendStatus; import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatus; import com.ningdatech.pmapi.meeting.entity.req.MeetingListReq; @@ -49,6 +50,14 @@ public class MeetingManageHelper { private final IExpertInviteRuleService inviteRuleService; private final IExpertInviteAvoidRuleService inviteAvoidRuleService; + public void checkReviewProject(MeetingBasicDTO meetingBasic) { + if (meetingBasic.getIsInnerProject()) { + Assert.notEmpty(meetingBasic.getProjectIdList(), "评审项目不能为空"); + } else { + Assert.notEmpty(meetingBasic.getProjects(), "评审项目不能为空"); + } + } + /** * 获取专家出席会议的状态 * diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java index 9af2fcd..1a6e19a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java @@ -21,10 +21,7 @@ import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; import com.ningdatech.pmapi.expert.helper.PermissionCheckHelper; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; import com.ningdatech.pmapi.meeting.builder.ExpertInviteBuilder; -import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteAvoidRule; -import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteRule; -import com.ningdatech.pmapi.meeting.entity.domain.Meeting; -import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; +import com.ningdatech.pmapi.meeting.entity.domain.*; import com.ningdatech.pmapi.meeting.entity.dto.*; import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatus; import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum; @@ -36,10 +33,7 @@ import com.ningdatech.pmapi.meeting.entity.vo.ExpertInviteDetailVO.RandomInviteL import com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper; import com.ningdatech.pmapi.meeting.helper.MeetingManageHelper; import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper; -import com.ningdatech.pmapi.meeting.service.IExpertInviteAvoidRuleService; -import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService; -import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; -import com.ningdatech.pmapi.meeting.service.IMeetingService; +import com.ningdatech.pmapi.meeting.service.*; import com.ningdatech.pmapi.meeting.task.ExpertInviteTask; import com.ningdatech.pmapi.meta.helper.DictionaryCache; import com.ningdatech.pmapi.meta.helper.TagCache; @@ -85,6 +79,8 @@ public class MeetingManage { private final DistributedLock distributedLock; private final PermissionCheckHelper permissionCheckHelper; private final IUserInfoService userInfoService; + private final IMeetingInnerProjectService meetingInnerProjectService; + private final IMeetingOuterProjectService meetingOuterProjectService; private final ExpertInviteHelper expertInviteHelper; private static final String INVITED_RULE_CREATE = "INVITED_RULE_CREATE:"; @@ -97,8 +93,9 @@ public class MeetingManage { public static final int RETRY_TIMES = 3; @Transactional(rollbackFor = Exception.class) - public IdVo save(MeetingCreateReq req) { + public IdVo meetingCreateAndInviteExpert(MeetingCreateReq req) { MeetingBasicDTO meetingBasic = req.getMeetingBasicInfo(); + meetingManageHelper.checkReviewProject(meetingBasic); String md5ByParam = SecureUtil.md5(meetingBasic.toString()); String key = MEETING_CREATE_KEY + md5ByParam; if (!distributedLock.lock(key, RETRY_TIMES)) { @@ -115,6 +112,22 @@ public class MeetingManage { meeting.setCreator(userDetail.getUsername()); meeting.setInviteStopped(true); meetingService.save(meeting); + if (meetingBasic.getIsInnerProject()) { + List projects = meetingBasic.getProjectIdList().stream().map(w -> { + MeetingInnerProject project = new MeetingInnerProject(); + project.setMeetingId(meeting.getId()); + project.setProjectId(w); + return project; + }).collect(Collectors.toList()); + meetingInnerProjectService.saveBatch(projects); + } else { + List projects = meetingBasic.getProjects().stream().map(w -> { + MeetingOuterProject project = BeanUtil.copyProperties(w, MeetingOuterProject.class); + project.setMeetingId(meeting.getId()); + return project; + }).collect(Collectors.toList()); + meetingOuterProjectService.saveBatch(projects); + } // 抽取专家 req.getExpertInviteRule().setMeetingId(meeting.getId()); expertInviteByCreate(req.getExpertInviteRule()); @@ -131,11 +144,12 @@ public class MeetingManage { throw BizException.wrap("不可重复进行专家抽取"); } try { - AvoidInfoDTO avoidInfo = req.getAvoidRule(); Meeting meeting = meetingService.getById(req.getMeetingId()); if (ExpertInviteTypeEnum.RANDOM.eq(req.getInviteType())) { List randomRules = req.getRandomRules(); Assert.notEmpty(randomRules, "随机抽取规则不能为空"); + AvoidInfoDTO avoidInfo = req.getAvoidRule(); + Assert.notNull(avoidInfo, "回避信息不能为空"); // 随机抽取的话则需进行抽取数量校验 ExpertCountOnChangeVO countOnChange = expertCountOnChange(req); if (!countOnChange.getStatus()) { @@ -152,11 +166,22 @@ public class MeetingManage { update.set(Meeting::getInviteStopped, false); update.eq(Meeting::getId, meeting.getId()); meetingService.update(update); + // 回避规则 + if (avoidInfo != null) { + ExpertInviteAvoidRule avoidRule = new ExpertInviteAvoidRule(); + avoidRule.setMeetingId(meeting.getId()); + // 未传值时设置为0 表示不限制周参与次数 + avoidRule.setWeekInviteCount(ObjectUtil.defaultIfNull(avoidRule.getWeekInviteCount(), 0)); + avoidRule.setAvoidOrgIds(CollUtils.joinByComma(avoidInfo.getAvoidOrgIdList())); + avoidRule.setAvoidUnitIds(CollUtils.joinByComma(avoidInfo.getAvoidUnitIdList())); + avoidRule.setExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); + inviteAvoidRuleService.save(avoidRule); + } } else { // 指定邀请 AppointInviteRuleDTO appointRule = req.getAppointRule(); Assert.notNull(appointRule, "指定邀请规则不能为空"); - Map usersMap = expertInviteHelper.checkAppointExpert(appointRule, avoidInfo); + Map usersMap = expertInviteHelper.checkAppointExpert(appointRule); // 处理指定抽取规则 ExpertInviteRule appoint = getExpertInviteRule(appointRule, meeting.getId()); inviteRuleService.save(appoint); @@ -169,17 +194,6 @@ public class MeetingManage { }).collect(Collectors.toList()); meetingExpertService.saveBatch(experts); } - // 回避规则 - if (avoidInfo != null) { - ExpertInviteAvoidRule avoidRule = new ExpertInviteAvoidRule(); - avoidRule.setMeetingId(meeting.getId()); - // 未传值时设置为0 表示不限制周参与次数 - avoidRule.setWeekInviteCount(ObjectUtil.defaultIfNull(avoidRule.getWeekInviteCount(), 0)); - avoidRule.setAvoidOrgIds(CollUtils.joinByComma(avoidInfo.getAvoidOrgIdList())); - avoidRule.setAvoidUnitIds(CollUtils.joinByComma(avoidInfo.getAvoidUnitIdList())); - avoidRule.setExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); - inviteAvoidRuleService.save(avoidRule); - } } finally { distributedLock.releaseLock(key); } @@ -194,7 +208,7 @@ public class MeetingManage { **/ public ExpertCountOnChangeVO expertCountOnChange(ExpertInviteReq req) { // 未传递指定邀请专家直接忽略 - expertInviteHelper.checkAppointExpert(req.getAppointRule(), req.getAvoidRule()); + expertInviteHelper.checkAppointExpert(req.getAppointRule()); Meeting meeting = meetingService.getById(req.getMeetingId()); ExpertCountOnChangeVO resultCount = new ExpertCountOnChangeVO(); resultCount.setStatus(true); @@ -321,22 +335,6 @@ public class MeetingManage { .build(); } - public void uploadMeetingResult(MeetingResultReq po) { - LambdaUpdateWrapper updater = Wrappers.lambdaUpdate(Meeting.class) - .eq(Meeting::getId, po.getMeetingId()) - .set(Meeting::getStatus, Manager.COMPLETED.getCode()); - meetingService.update(updater); - } - - public MeetingResultVO meetingResultDetail(Long meetingId) { - LambdaQueryWrapper query = Wrappers.lambdaQuery(Meeting.class) - .eq(Meeting::getId, meetingId); - MeetingResultVO result = new MeetingResultVO(); - result.setMeetingId(meetingId); - return result; - } - - public ExpertInviteDetailVO inviteDetail(Long meetingId) { ExpertInviteDetailVO result = new ExpertInviteDetailVO(); Meeting meeting = meetingService.getById(meetingId); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.java new file mode 100644 index 0000000..8a393df --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meeting.mapper; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingInnerProject; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 会议评审内部项目表 Mapper 接口 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +public interface MeetingInnerProjectMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.xml new file mode 100644 index 0000000..3d78af0 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingInnerProjectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.java new file mode 100644 index 0000000..b0e89f4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meeting.mapper; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingOuterProject; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 会议评审外部项目 Mapper 接口 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +public interface MeetingOuterProjectMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.xml new file mode 100644 index 0000000..52d562d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingOuterProjectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java new file mode 100644 index 0000000..be0a0b1 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meeting.service; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingInnerProject; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 会议评审内部项目表 服务类 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +public interface IMeetingInnerProjectService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java new file mode 100644 index 0000000..b7f66a9 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meeting.service; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingOuterProject; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 会议评审外部项目 服务类 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +public interface IMeetingOuterProjectService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java new file mode 100644 index 0000000..c877620 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meeting.service.impl; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingInnerProject; +import com.ningdatech.pmapi.meeting.mapper.MeetingInnerProjectMapper; +import com.ningdatech.pmapi.meeting.service.IMeetingInnerProjectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 会议评审内部项目表 服务实现类 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +@Service +public class MeetingInnerProjectServiceImpl extends ServiceImpl implements IMeetingInnerProjectService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java new file mode 100644 index 0000000..f84b62d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meeting.service.impl; + +import com.ningdatech.pmapi.meeting.entity.domain.MeetingOuterProject; +import com.ningdatech.pmapi.meeting.mapper.MeetingOuterProjectMapper; +import com.ningdatech.pmapi.meeting.service.IMeetingOuterProjectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 会议评审外部项目 服务实现类 + *

+ * + * @author WendyYang + * @since 2023-02-28 + */ +@Service +public class MeetingOuterProjectServiceImpl extends ServiceImpl implements IMeetingOuterProjectService { + +}