diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/ExpertDashboardController.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/ExpertDashboardController.java index b032ba9..8aedf55 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/ExpertDashboardController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/ExpertDashboardController.java @@ -39,12 +39,6 @@ public class ExpertDashboardController { return dashboardManage.meetingCalender(po); } - @ApiOperation("待办:专家评价列表") - @GetMapping("/todo/expertEvaluation") - public PageVo expertEvaluationToDo(PagePo po) { - return dashboardManage.expertEvaluationToDo(po); - } - @ApiOperation("待办:专家待替换列表") @GetMapping("/todo/expertReplace") public PageVo expertReplaceToDo(PagePo po) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java index d4ef85f..da01d16 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java @@ -207,7 +207,7 @@ public class MeetingController { @ApiOperation("查询会议专家评价信息") @WebLog("查询会议专家评价信息") public List listExpertEval(@PathVariable Long meetingId) { - return meetingManage.listExpertEval(meetingId); + return meetingManage.listExpertJudge(meetingId); } } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java index e5fc724..1e98862 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java @@ -35,9 +35,9 @@ public class MeetingExpertJudgeController { } @ApiOperation("查看履职评价") - @GetMapping("/detail/{meetingExpertId}") - public MeetingExpertJudgeReq expertJudgeDetail(@PathVariable Long meetingExpertId) { - return expertJudgeManage.expertJudgeDetail(meetingExpertId); + @GetMapping("/detail/{expertJudgeId}") + public MeetingExpertJudgeReq expertJudgeDetail(@PathVariable Long expertJudgeId) { + return expertJudgeManage.expertJudgeDetail(expertJudgeId); } } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/domain/MeetingExpertEvaluation.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/domain/MeetingExpertEvaluation.java deleted file mode 100644 index ac0f2e6..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/domain/MeetingExpertEvaluation.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.hz.pm.api.meeting.entity.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.hz.pm.api.sys.model.entity.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 专家评价表 - *

- * - * @author WendyYang - * @since 2022-07-25 - */ -@Data -@TableName("meeting_expert_evaluation") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "MeetingExpertEvaluation对象", description = "专家评价表") -public class MeetingExpertEvaluation extends BaseEntity { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("主键") - @TableId(type = IdType.AUTO) - private Long id; - - @ApiModelProperty("专家事务关联ID") - private Long expertMeetingId; - - @ApiModelProperty("事务ID") - private Long meetingId; - - @ApiModelProperty("专家ID") - private Long expertId; - - @TableField(value = "is_attended") - @ApiModelProperty("是否参加") - private Boolean attended; - - @TableField(value = "is_in_time") - @ApiModelProperty("是否准时参加") - private Boolean inTime; - - @TableField(value = "is_violated") - @ApiModelProperty("是否违规") - private Boolean violated; - - @ApiModelProperty("参与程度") - private Integer initiative; - - @ApiModelProperty("建设性建议") - private String advice; - - @ApiModelProperty("评审结果情况") - private String evaluateResult; - - @ApiModelProperty("违规情况") - private String violation; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/req/MeetingExpertEvalReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/req/MeetingExpertEvalReq.java deleted file mode 100644 index 6ea0385..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/req/MeetingExpertEvalReq.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hz.pm.api.meeting.entity.req; - -import com.ningdatech.basic.model.PagePo; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * MeetingExpertEvaluationReq - *

- * - * @author WendyYang - * @since 16:44 2023/12/18 - */ -@Data -@EqualsAndHashCode(callSuper = true) -public class MeetingExpertEvalReq extends PagePo { - - @ApiModelProperty("会议ID") - private Long meetingId; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/DashboardManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/DashboardManage.java index e001ea3..25f2bdd 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/DashboardManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/DashboardManage.java @@ -4,26 +4,24 @@ import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ningdatech.basic.exception.BizException; -import com.ningdatech.basic.model.PagePo; -import com.ningdatech.basic.model.PageVo; -import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.meeting.entity.domain.Meeting; import com.hz.pm.api.meeting.entity.domain.MeetingExpert; import com.hz.pm.api.meeting.entity.dto.CountConfirmByMeetingIdDTO; import com.hz.pm.api.meeting.entity.dto.MeetingAndAttendStatusDTO; import com.hz.pm.api.meeting.entity.enumeration.ExpertInviteTypeEnum; import com.hz.pm.api.meeting.entity.enumeration.MeetingStatusByDashboard; -import com.hz.pm.api.meeting.entity.enumeration.MeetingStatusEnum; import com.hz.pm.api.meeting.entity.req.MeetingCalenderReq; import com.hz.pm.api.meeting.entity.req.MeetingListReq; import com.hz.pm.api.meeting.entity.vo.*; import com.hz.pm.api.meeting.helper.MeetingManageHelper; -import com.hz.pm.api.meeting.service.IMeetingExpertEvaluationService; import com.hz.pm.api.meeting.service.IMeetingExpertService; import com.hz.pm.api.meeting.service.IMeetingService; import com.hz.pm.api.meta.helper.DictionaryCache; import com.hz.pm.api.user.util.LoginUserUtil; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.basic.model.PagePo; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.basic.util.CollUtils; import lombok.AllArgsConstructor; import org.apache.commons.lang3.tuple.Pair; import org.springframework.stereotype.Component; @@ -50,7 +48,6 @@ public class DashboardManage { private final IMeetingService meetingService; private final IMeetingExpertService meetingExpertService; private final MeetingManageHelper meetingManageHelper; - private final IMeetingExpertEvaluationService meetingExpertEvaluationService; private final DictionaryCache dictionaryCache; public static final int MEETING_CALENDER_MONTHS = 2; @@ -95,44 +92,6 @@ public class DashboardManage { return result; } - public PageVo expertEvaluationToDo(PagePo po) { - PageVo result = PageVo.of(new ArrayList<>(), 0L); - // 查询所有未完成的项目 - LambdaQueryWrapper query = Wrappers.lambdaQuery(Meeting.class) - .select(Meeting::getId) - .ne(Meeting::getStatus, MeetingStatusEnum.CANCELED.getCode()) - .eq(Meeting::getCreateBy, LoginUserUtil.getUserId()); - List meetings = meetingService.list(query); - if (meetings.isEmpty()) { - return PageVo.empty(); - } - List meetingIds = CollUtils.fieldList(meetings, Meeting::getId); - Page page = meetingExpertEvaluationService.pageExpertEvaluationTodo(meetingIds, po); - if (page.getTotal() > 0) { - List expertIds = new ArrayList<>(); - List meetingIdsByPage = new ArrayList<>(); - page.getRecords().forEach(w -> { - meetingIdsByPage.add(w.getMeetingId()); - expertIds.add(w.getExpertId()); - }); - Map meetingMap = CollUtils.listToMap(meetingService.listByIds(meetingIdsByPage), Meeting::getId); - Map basicInfoVoMap = meetingManageHelper.getExpertBasicInfo(expertIds); - page.getRecords().forEach(w -> { - ExpertBasicInfoVO expertInfo = basicInfoVoMap.get(w.getExpertId()); - Meeting meeting = meetingMap.get(w.getMeetingId()); - ExpertEvaluationToDoListItemVO item = BeanUtil.copyProperties(expertInfo, ExpertEvaluationToDoListItemVO.class); - item.setMeetingName(meeting.getName()); - item.setMeetingId(w.getMeetingId()); - item.setExpertMeetingId(w.getId()); - item.setStartTime(meeting.getStartTime()); - item.setEndTime(meeting.getEndTime()); - result.getRecords().add(item); - }); - result.setTotal(page.getTotal()); - } - return result; - } - public PageVo expertConfirmToDo(PagePo po) { // 查询所有未完成的项目 LambdaQueryWrapper query = Wrappers.lambdaQuery(Meeting.class) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java index b92bfb8..3274ab0 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java @@ -83,8 +83,8 @@ public class MeetingExpertJudgeManage { } } - public MeetingExpertJudgeReq expertJudgeDetail(Long meetingExpertId) { - MeetingExpertJudge judge = getMeetingExpertJudge(meetingExpertId); + public MeetingExpertJudgeReq expertJudgeDetail(Long expertJudgeId) { + MeetingExpertJudge judge = expertJudgeService.getById(expertJudgeId); if (judge == null) { throw BizException.wrap("履职评价未提交"); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertManage.java deleted file mode 100644 index c18c104..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertManage.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hz.pm.api.meeting.manage; - -import com.hz.pm.api.meeting.helper.MeetingManageHelper; -import com.hz.pm.api.meeting.service.IMeetingExpertEvaluationService; -import com.hz.pm.api.meeting.service.IMeetingExpertService; -import lombok.AllArgsConstructor; -import org.springframework.stereotype.Component; - -/** - *

- * MeetingExpertManage - *

- * - * @author WendyYang - * @since 10:04 2022/8/24 - */ -@Component -@AllArgsConstructor -public class MeetingExpertManage { - - private final IMeetingExpertService meetingExpertService; - private final IMeetingExpertEvaluationService meetingExpertEvaluationService; - private final MeetingManageHelper meetingManageHelper; - -} 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 8570d6b..2803f4a 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 @@ -98,7 +98,8 @@ public class MeetingManage { private final MeetingCallOrMsgHelper meetingCallOrMsgHelper; private final MeetingDataScopeHelper meetingDataScopeHelper; private final IMeetingExpertJudgeService expertJudgeService; - private final IMeetingExpertEvaluationService expertEvaluationService; + private final IMeetingExpertJudgeService meetingExpertJudgeService; + private static final String INVITED_RULE_CREATE = "INVITED_RULE_CREATE:"; private static final String MEETING_CREATE_KEY = "MEETING_CREATE:"; @@ -971,12 +972,12 @@ public class MeetingManage { } } - public List listExpertEval(Long meetingId) { + public List listExpertJudge(Long meetingId) { List experts = meetingExpertService.listAgreedExperts(meetingId); if (experts.isEmpty()) { return Collections.emptyList(); } - Map evaluationIdMap = expertEvaluationService.getExpertEvaluationIdMap(meetingId); + Map evaluationIdMap = meetingExpertJudgeService.getExpertJudgeIdMap(meetingId); List expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); Map expertMap = meetingManageHelper.getExpertBasicInfo(expertIds); return experts.stream().map(w -> { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.java deleted file mode 100644 index 4b46de6..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hz.pm.api.meeting.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.hz.pm.api.common.model.entity.CountGroupByDTO; -import com.hz.pm.api.meeting.entity.domain.MeetingExpert; -import com.hz.pm.api.meeting.entity.domain.MeetingExpertEvaluation; -import org.apache.ibatis.annotations.Param; - -import java.util.Collection; - -/** - *

- * 专家评价表 Mapper 接口 - *

- * - * @author WendyYang - * @since 2022-07-25 - */ -public interface MeetingExpertEvaluationMapper extends BaseMapper { - - Page> countExpertAttend(@Param("expertIds") Collection expertIds, @Param("isAttended") Boolean isAttended, Page> page); - - Page pageExpertEvaluationToDo(@Param("meetingIds") Collection meetingIds, Page po); - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.xml deleted file mode 100644 index 1d0df39..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/mapper/MeetingExpertEvaluationMapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertEvaluationService.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertEvaluationService.java deleted file mode 100644 index 0229a3f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertEvaluationService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hz.pm.api.meeting.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.basic.model.PagePo; -import com.hz.pm.api.common.model.entity.CountGroupByDTO; -import com.hz.pm.api.meeting.entity.domain.MeetingExpert; -import com.hz.pm.api.meeting.entity.domain.MeetingExpertEvaluation; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - *

- * 专家评价表 服务类 - *

- * - * @author WendyYang - * @since 2022-07-25 - */ -public interface IMeetingExpertEvaluationService extends IService { - - Page> listExpertAttendSummary(Collection expertIds, Boolean isAttended, Page> page); - - Page pageExpertEvaluationTodo(Collection meetingIds, PagePo po); - - List listMeetingExpertEvaluations(Long meetingId); - - Map getExpertEvaluationIdMap(Long meetingId); - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java index b77cedf..3bd227d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java @@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Map; /** *

@@ -31,4 +32,11 @@ public interface IMeetingExpertJudgeService extends IService return CollUtils.fieldList(list(query), MeetingExpertJudge::getMeetingExpertId); } + default Map getExpertJudgeIdMap(Long meetingId){ + LambdaQueryWrapper query = Wrappers.lambdaQuery(MeetingExpertJudge.class) + .select(MeetingExpertJudge::getExpertId,MeetingExpertJudge::getId) + .eq(MeetingExpertJudge::getMeetingId, meetingId); + return CollUtils.listToMap(list(query), MeetingExpertJudge::getExpertId,MeetingExpertJudge::getExpertId); + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/impl/MeetingExpertEvaluationServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/impl/MeetingExpertEvaluationServiceImpl.java deleted file mode 100644 index fc3487c..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/impl/MeetingExpertEvaluationServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.hz.pm.api.meeting.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.hz.pm.api.common.model.entity.CountGroupByDTO; -import com.hz.pm.api.meeting.entity.domain.MeetingExpert; -import com.hz.pm.api.meeting.entity.domain.MeetingExpertEvaluation; -import com.hz.pm.api.meeting.mapper.MeetingExpertEvaluationMapper; -import com.hz.pm.api.meeting.service.IMeetingExpertEvaluationService; -import com.ningdatech.basic.model.PagePo; -import com.ningdatech.basic.util.CollUtils; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - *

- * 专家评价表 服务实现类 - *

- * - * @author WendyYang - * @since 2022-07-25 - */ -@Service -public class MeetingExpertEvaluationServiceImpl extends ServiceImpl implements IMeetingExpertEvaluationService { - - private LambdaQueryWrapper queryByMetingId(Long meetingId) { - return Wrappers.lambdaQuery(MeetingExpertEvaluation.class) - .eq(MeetingExpertEvaluation::getMeetingId, meetingId) - .orderByDesc(MeetingExpertEvaluation::getCreateOn); - } - - @Override - public Page> listExpertAttendSummary(Collection expertIds, Boolean isAttended, Page> page) { - return baseMapper.countExpertAttend(expertIds, isAttended, page); - } - - @Override - public Page pageExpertEvaluationTodo(Collection meetingIds, PagePo po) { - return baseMapper.pageExpertEvaluationToDo(meetingIds, new Page<>(po.getPageNumber(), po.getPageSize())); - } - - @Override - public List listMeetingExpertEvaluations(Long meetingId) { - return list(queryByMetingId(meetingId)); - } - - @Override - public Map getExpertEvaluationIdMap(Long meetingId) { - LambdaQueryWrapper query = queryByMetingId(meetingId) - .select(MeetingExpertEvaluation::getId, MeetingExpertEvaluation::getExpertId); - return CollUtils.listToMap(list(query), MeetingExpertEvaluation::getExpertId, - MeetingExpertEvaluation::getId); - } - -}