From 7ba152031bd2b14a2ede7ed2f9c0d05aa012117a Mon Sep 17 00:00:00 2001 From: lijiaqi Date: Sat, 8 Oct 2022 11:49:53 +0800 Subject: [PATCH] =?UTF-8?q?2.=09=E7=AC=AC=E5=9B=9B=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=8E=A5=E5=8F=A3=E5=BE=81?= =?UTF-8?q?=E6=B1=82=E6=84=8F=E8=A7=81=E3=80=81=E5=86=85=E5=AE=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B0=83=E6=9F=A5=E9=97=AE=E5=8D=B7=EF=BC=88=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=99=84=E4=BB=B6=E5=8A=9F=E8=83=BD=EF=BC=89=E3=80=81?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E6=B1=87=E6=80=BB=EF=BC=88=E7=95=99=E8=A8=80?= =?UTF-8?q?=E6=A0=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ApiReviewWorkController.java | 82 ++++++++++++++++--- .../rddb/entity/ReviewWorkMessage.java | 48 +++++++++++ .../rddb/entity/dto/ReviewWorkDto.java | 2 + .../review_work/ReviewWorkMessageRequest.java | 13 +++ .../state/ReviewWorkAskStateRequest.java | 16 ++++ .../boot/modules/rddb/gen/MyGenerator.java | 4 +- .../rddb/mapper/ReviewWorkMessageMapper.java | 16 ++++ .../mapper/xml/ReviewWorkMessageMapper.xml | 5 ++ .../service/ReviewWorkMessageService.java | 20 +++++ .../rddb/service/ReviewWorkService.java | 57 ++++++++++++- .../inter/IReviewWorkMessageService.java | 16 ++++ .../rddb/web/ReviewWorkMessageController.java | 21 +++++ .../rddb/wrapper/ReviewWorkWrapper.java | 21 +++++ 13 files changed, 305 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/ydool/boot/modules/rddb/entity/ReviewWorkMessage.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/ReviewWorkMessageRequest.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/state/ReviewWorkAskStateRequest.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/mapper/ReviewWorkMessageMapper.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/mapper/xml/ReviewWorkMessageMapper.xml create mode 100644 src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkMessageService.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/service/inter/IReviewWorkMessageService.java create mode 100644 src/main/java/com/ydool/boot/modules/rddb/web/ReviewWorkMessageController.java diff --git a/src/main/java/com/ydool/boot/api/controller/ApiReviewWorkController.java b/src/main/java/com/ydool/boot/api/controller/ApiReviewWorkController.java index dcc961c..8160afd 100644 --- a/src/main/java/com/ydool/boot/api/controller/ApiReviewWorkController.java +++ b/src/main/java/com/ydool/boot/api/controller/ApiReviewWorkController.java @@ -13,12 +13,15 @@ import com.ydool.boot.common.result.Ret; import com.ydool.boot.modules.rddb.entity.Const; import com.ydool.boot.modules.rddb.entity.ReviewWork; import com.ydool.boot.modules.rddb.entity.ReviewWorkComment; +import com.ydool.boot.modules.rddb.entity.ReviewWorkMessage; import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkDto; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkAuditRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCheckRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCommentRequest; +import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkMessageRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.state.*; import com.ydool.boot.modules.rddb.service.ReviewWorkCommentService; +import com.ydool.boot.modules.rddb.service.ReviewWorkMessageService; import com.ydool.boot.modules.rddb.service.ReviewWorkService; import com.ydool.boot.modules.rddb.wrapper.ReviewWorkWrapper; import io.swagger.annotations.Api; @@ -45,6 +48,9 @@ public class ApiReviewWorkController extends ApiBaseController { @Autowired ReviewWorkCommentService reviewWorkCommentService; + @Autowired + ReviewWorkMessageService reviewWorkMessageService; + @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"), @@ -62,9 +68,11 @@ public class ApiReviewWorkController extends ApiBaseController { // .and(_qw -> _qw // .eq("created_id", getApiUserId()) // .or() -// .inSql("id", "select review_id from t_review_work_user where user_id='" + getApiUserId() + "'") +// .inSql("id", "select review_id from t_review_work_user where user_id='" + getApiUserId() + +// "'") // .or() -// .inSql("id", "select review_id from t_review_work_audit where user_id='" + getApiUserId() + "'")) +// .inSql("id", "select review_id from t_review_work_audit where user_id='" + getApiUserId() + +// "'")) .orderByDesc("created_at"); if (Const.TYPE_RDDB.equals(platform)) { qw.like("obj", platform); @@ -141,6 +149,33 @@ public class ApiReviewWorkController extends ApiBaseController { render(Ret.ok().paged(paged)); } + @ApiOperation("意见") + @PostMapping("message") + @ResponseBody + public void message(@Validated ReviewWorkMessageRequest reviewWorkMessageRequest) { + Ret ret = reviewWorkService.message(reviewWorkMessageRequest, getApiUser()); + render(ret); + } + + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页"), + @ApiImplicitParam(name = "size", value = "显示条数"), + @ApiImplicitParam(name = "reviewId", value = "评议id"), + }) + @DynamicResponseParameters(properties = { + @DynamicParameter(value = "评议意见", name = "data", dataTypeClass = ReviewWorkMessage.class) + }) + @ApiOperation("意见列表") + @GetMapping("message") + public void messagePage(String reviewId) { + LambdaQueryWrapper qw = new LambdaQueryWrapper() + .eq(StrUtil.isNotBlank(reviewId), ReviewWorkMessage::getReviewId, reviewId) + .orderByDesc(ReviewWorkMessage::getCreatedAt); + IPage paged = reviewWorkMessageService.page(new Page<>(getPageNum(), getPageSize()), qw); + render(Ret.ok().paged(paged)); + } + + @ApiOperation("内部上报环节") @PostMapping("state/in_report") @ResponseBody @@ -171,27 +206,48 @@ public class ApiReviewWorkController extends ApiBaseController { // render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review))); // } - @ApiOperation("上传自查/调查报告环节") - @PostMapping("state/check") - @ResponseBody - @DynamicResponseParameters(properties = { - @DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class) - }) - public void stateCheckSave2(@RequestBody @Validated WorkCheckRequest workCheckRequest) { - ReviewWork review = reviewWorkService.stateCheckSave(workCheckRequest, getApiUser()); - render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review))); - } @ApiOperation("上报评议部门") @PostMapping("state/report") @ResponseBody @DynamicResponseParameters(properties = { @DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class) }) - public void stateReport(@RequestBody ReviewWorkReportStateRequest reviewWorkReportStateRequest){ + public void stateReport(@RequestBody ReviewWorkReportStateRequest reviewWorkReportStateRequest) { ReviewWork review = reviewWorkService.stateReport(reviewWorkReportStateRequest, getApiUser()); render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review))); } + @ApiOperation("上传自查/调查报告环节") + @PostMapping("state/check") + @ResponseBody + @DynamicResponseParameters(properties = { + @DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class) + }) + public void stateCheckSave(@RequestBody @Validated WorkCheckRequest workCheckRequest) { + ReviewWork review = reviewWorkService.stateCheckSave(workCheckRequest, getApiUser()); + render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review))); + } + + @ApiOperation("征求意见环节") + @PostMapping("state/ask") + @ResponseBody + @DynamicResponseParameters(properties = { + @DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class) + }) + public void stateAskSave(@RequestBody @Validated ReviewWorkAskStateRequest reviewWorkAskStateRequest) { + ReviewWork review = reviewWorkService.stateAskSave(reviewWorkAskStateRequest, getApiUser()); + render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review))); + } + + + @ApiOperation("意见汇总结束") + @PostMapping("ask/end/{id}") + @ApiImplicitParam(name = "id", value = "评议id") + @ResponseBody + public void askEnd(@PathVariable String id) { + Ret ret = reviewWorkService.askEnd(id, getApiUser()); + render(ret); + } @ApiOperation("打分") diff --git a/src/main/java/com/ydool/boot/modules/rddb/entity/ReviewWorkMessage.java b/src/main/java/com/ydool/boot/modules/rddb/entity/ReviewWorkMessage.java new file mode 100644 index 0000000..af756cf --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/entity/ReviewWorkMessage.java @@ -0,0 +1,48 @@ +package com.ydool.boot.modules.rddb.entity; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ydool.boot.core.entity.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +/** + *

+ * 评议意见汇总 + *

+ * + * @author zhouyuan + * @since 2022-10-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("t_review_work_message") +public class ReviewWorkMessage extends BaseEntity{ + + private static final long serialVersionUID = 1L; + + /** + * 创建者 + */ + private String createdId; + + /** + * 更新者 + */ + private String updatedId; + + /** + * 评议id + */ + private String reviewId; + + /** + * 人员id + */ + private String userId; + + /** + * 内容 + */ + private String content; + + private String userName; + +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/entity/dto/ReviewWorkDto.java b/src/main/java/com/ydool/boot/modules/rddb/entity/dto/ReviewWorkDto.java index c163583..ece3ec9 100644 --- a/src/main/java/com/ydool/boot/modules/rddb/entity/dto/ReviewWorkDto.java +++ b/src/main/java/com/ydool/boot/modules/rddb/entity/dto/ReviewWorkDto.java @@ -18,6 +18,8 @@ public class ReviewWorkDto extends ReviewWork { List checkAttachment1List; @ApiModelProperty(value = "会议方案") List checkAttachment2List; + @ApiModelProperty(value = "调查问卷") + List askAttachmentList; @ApiModelProperty(value = "评议意见附件") List opinionAttachmentList; @ApiModelProperty(value = "整改结果附件") diff --git a/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/ReviewWorkMessageRequest.java b/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/ReviewWorkMessageRequest.java new file mode 100644 index 0000000..667dcb0 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/ReviewWorkMessageRequest.java @@ -0,0 +1,13 @@ +package com.ydool.boot.modules.rddb.entity.request.review_work; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class ReviewWorkMessageRequest { + @ApiModelProperty(value = "评议id", required = true) + private String reviewId; + + @ApiModelProperty(value = "内容", required = true) + private String content; +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/state/ReviewWorkAskStateRequest.java b/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/state/ReviewWorkAskStateRequest.java new file mode 100644 index 0000000..0eaf942 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/entity/request/review_work/state/ReviewWorkAskStateRequest.java @@ -0,0 +1,16 @@ +package com.ydool.boot.modules.rddb.entity.request.review_work.state; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class ReviewWorkAskStateRequest { + + @ApiModelProperty(value = "评议id", required = true) + private String id; + + @ApiModelProperty(value = "调查问卷") + private List attachment; +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/gen/MyGenerator.java b/src/main/java/com/ydool/boot/modules/rddb/gen/MyGenerator.java index a366262..89e6abd 100644 --- a/src/main/java/com/ydool/boot/modules/rddb/gen/MyGenerator.java +++ b/src/main/java/com/ydool/boot/modules/rddb/gen/MyGenerator.java @@ -20,7 +20,7 @@ public class MyGenerator { public static void main(String[] args) { //表名 - String tableName = "t_conference_attachment_vote"; + String tableName = "t_review_work_message"; //表前缀 String tablePrefix = "t_"; @@ -47,7 +47,7 @@ public class MyGenerator { dsc.setUrl("jdbc:mysql://127.0.0.1:3306/ydool_rd?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8"); dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setUsername("root"); - dsc.setPassword("123456"); + dsc.setPassword("Wang09211108"); dsc.setDbType(DbType.MYSQL); mpg.setDataSource(dsc); diff --git a/src/main/java/com/ydool/boot/modules/rddb/mapper/ReviewWorkMessageMapper.java b/src/main/java/com/ydool/boot/modules/rddb/mapper/ReviewWorkMessageMapper.java new file mode 100644 index 0000000..39af360 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/mapper/ReviewWorkMessageMapper.java @@ -0,0 +1,16 @@ +package com.ydool.boot.modules.rddb.mapper; + +import com.ydool.boot.modules.rddb.entity.ReviewWorkMessage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 评议意见汇总 Mapper 接口 + *

+ * + * @author zhouyuan + * @since 2022-10-08 + */ +public interface ReviewWorkMessageMapper extends BaseMapper { + +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/mapper/xml/ReviewWorkMessageMapper.xml b/src/main/java/com/ydool/boot/modules/rddb/mapper/xml/ReviewWorkMessageMapper.xml new file mode 100644 index 0000000..5255351 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/mapper/xml/ReviewWorkMessageMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkMessageService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkMessageService.java new file mode 100644 index 0000000..3a9d582 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkMessageService.java @@ -0,0 +1,20 @@ +package com.ydool.boot.modules.rddb.service; + +import com.ydool.boot.modules.rddb.entity.ReviewWorkMessage; +import com.ydool.boot.modules.rddb.mapper.ReviewWorkMessageMapper; +import com.ydool.boot.modules.rddb.service.inter.IReviewWorkMessageService; +import com.ydool.boot.core.service.BaseService; +import org.springframework.stereotype.Service; + +/** + *

+ * 评议意见汇总 服务实现类 + *

+ * + * @author zhouyuan + * @since 2022-10-08 + */ +@Service +public class ReviewWorkMessageService extends BaseService implements IReviewWorkMessageService { + +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java index 6d8a437..b8e3c3f 100644 --- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java +++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java @@ -18,6 +18,7 @@ import com.ydool.boot.modules.rddb.entity.bo.ReviewWorkBo; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkAuditRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCheckRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCommentRequest; +import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkMessageRequest; import com.ydool.boot.modules.rddb.entity.request.review_work.state.*; import com.ydool.boot.modules.rddb.mapper.ReviewWorkMapper; import com.ydool.boot.modules.rddb.wrapper.ReviewWorkWrapper; @@ -50,6 +51,8 @@ public class ReviewWorkService extends BaseService ReviewWorkAuditService reviewWorkAuditService; @Autowired ReviewWorkUserService reviewWorkUserService; + @Autowired + ReviewWorkMessageService reviewWorkMessageService; @Autowired ConferenceAttachmentService conferenceAttachmentService; @@ -145,6 +148,22 @@ public class ReviewWorkService extends BaseService return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWorkWrapper.build().entityVO(reviewWork)); } + public Ret message(ReviewWorkMessageRequest reviewWorkMessageRequest, User loginUser) { + ReviewWork reviewWork = getById(reviewWorkMessageRequest.getReviewId()); + Assert.notNull(reviewWork, "未找到该记录"); + if (ReviewWork.STATE_ASK != reviewWork.getState()) + throw new ResultException(Ret.fail("当前环节不能提意见")); + ReviewWorkMessage reviewWorkMessage = BeanUtil.copyProperties(reviewWorkMessageRequest, + ReviewWorkMessage.class); + reviewWorkMessage.setCreatedId(loginUser.getId()); + reviewWorkMessage.setUserId(loginUser.getId()); + reviewWorkMessage.setUserName(loginUser.getUserName()); + boolean flag = reviewWorkMessageService.saveOrUpdate(reviewWorkMessage); + return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWorkWrapper.build().entityVO(reviewWork)); + } + + + @Transactional public ReviewWork stateInReportSave(ReviewWorkInReportStateRequest reviewWorkInReportStateRequest, User loginUser) { ReviewWork reviewWork = BeanUtil.copyProperties(reviewWorkInReportStateRequest, ReviewWork.class); @@ -238,6 +257,29 @@ public class ReviewWorkService extends BaseService return reviewWork; } + @Transactional + public ReviewWork stateAskSave(ReviewWorkAskStateRequest reviewWorkAskStateRequest, User loginUser) { + ReviewWork reviewWork = getById(reviewWorkAskStateRequest.getId()); + Assert.notNull(reviewWork, "未找到该记录"); + if (ReviewWork.STATE_ASK != reviewWork.getState()) + throw new ResultException(Ret.fail("当前环节不能提交该信息")); + BeanUtil.copyProperties(reviewWorkAskStateRequest, reviewWork); + saveOrUpdate(reviewWork); +// saveReviewWorkCheck(reviewWork, workCheckRequest, loginUser); + List attachment = reviewWorkAskStateRequest.getAttachment(); + if (CollectionUtil.isNotEmpty(attachment)){ + saveReviewWorkAttachment(reviewWork.getId(), + attachment.stream().map(CheckAttachment::getCheckAttachmentName).collect(Collectors.toList()).toString(), + attachment.stream().map(CheckAttachment::getCheckAttachmentPath).collect(Collectors.toList()).toString(), loginUser, ReviewWork.STATE_ASK, + attachment.stream().map(CheckAttachment::getCheckAttachmentConferenceId).collect(Collectors.toList()).toString(), + attachment.stream().map(CheckAttachment::getCheckAttachmentConferenceName).collect(Collectors.toList()).toString()); + } + return reviewWork; + } + + + + @Transactional public ReviewWork stateReport(ReviewWorkReportStateRequest reviewWorkReportStateRequest, User loginUser) { ReviewWork reviewWork = getById(reviewWorkReportStateRequest.getId()); @@ -348,6 +390,7 @@ public class ReviewWorkService extends BaseService } + public Ret check(ReviewWorkCheckRequest reviewWorkCheckRequest, User loginUser) { ReviewWork reviewWork = getById(reviewWorkCheckRequest.getReviewId()); Assert.notNull(reviewWork, "未找到该记录"); @@ -383,6 +426,17 @@ public class ReviewWorkService extends BaseService return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWorkWrapper.build().entityVO(reviewWork)); } + public Ret askEnd(String id, User loginUser) { + ReviewWork reviewWork = getById(id); + Assert.notNull(reviewWork, "未找到该记录"); + if (ReviewWork.STATE_ASK != reviewWork.getState()) + throw new ResultException(Ret.fail("当前环节不能提交该信息")); + if (!loginUser.getId().equals(reviewWork.getCreatedId())) return Ret.fail("您不是创建人,不能操作"); + reviewWork.setState(ReviewWork.STATE_OPINION); + boolean flag = saveOrUpdate(reviewWork); + return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWorkWrapper.build().entityVO(reviewWork)); + } + public ReviewWork stateOpinionSave(ReviewWorkOpinionStateRequest reviewWorkOpinionStateRequest, User loginUser) { ReviewWork reviewWork = getById(reviewWorkOpinionStateRequest.getReviewId()); Assert.notNull(reviewWork, "未找到该记录"); @@ -617,7 +671,8 @@ public class ReviewWorkService extends BaseService , String conferenceName,String classify) { reviewWorkAttachmentService.remove(new LambdaQueryWrapper() .eq(ReviewWorkAttachment::getReviewId, reviewId) - .eq(ReviewWorkAttachment::getType, state)); + .eq(ReviewWorkAttachment::getType, state) + .eq(ReviewWorkAttachment::getClassify,classify)); if (StrUtil.isNotBlank(attachmentName)) { String[] nameArr = attachmentName.split(","); String[] pathArr = attachmentPath.split(","); diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/inter/IReviewWorkMessageService.java b/src/main/java/com/ydool/boot/modules/rddb/service/inter/IReviewWorkMessageService.java new file mode 100644 index 0000000..70bd0e2 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/service/inter/IReviewWorkMessageService.java @@ -0,0 +1,16 @@ +package com.ydool.boot.modules.rddb.service.inter; + +import com.ydool.boot.modules.rddb.entity.ReviewWorkMessage; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 评议意见汇总 服务类 + *

+ * + * @author zhouyuan + * @since 2022-10-08 + */ +public interface IReviewWorkMessageService extends IService { + +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/web/ReviewWorkMessageController.java b/src/main/java/com/ydool/boot/modules/rddb/web/ReviewWorkMessageController.java new file mode 100644 index 0000000..5bc6784 --- /dev/null +++ b/src/main/java/com/ydool/boot/modules/rddb/web/ReviewWorkMessageController.java @@ -0,0 +1,21 @@ +package com.ydool.boot.modules.rddb.web; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; +import com.ydool.boot.core.web.BaseController; + +/** + *

+ * 评议意见汇总 前端控制器 + *

+ * + * @author zhouyuan + * @since 2022-10-08 + */ +@Controller +@RequestMapping("/rddb/reviewWorkMessage") +public class ReviewWorkMessageController extends BaseController { + +} diff --git a/src/main/java/com/ydool/boot/modules/rddb/wrapper/ReviewWorkWrapper.java b/src/main/java/com/ydool/boot/modules/rddb/wrapper/ReviewWorkWrapper.java index eba9e4e..d454f40 100644 --- a/src/main/java/com/ydool/boot/modules/rddb/wrapper/ReviewWorkWrapper.java +++ b/src/main/java/com/ydool/boot/modules/rddb/wrapper/ReviewWorkWrapper.java @@ -152,6 +152,26 @@ public class ReviewWorkWrapper extends BaseWrapper { } + List askAttachmentList = reviewWorkAttachmentService.list(new + LambdaQueryWrapper() + .eq(ReviewWorkAttachment::getReviewId, reviewWork.getId()) + .eq(ReviewWorkAttachment::getType, ReviewWork.STATE_ASK) + .orderByDesc(ReviewWorkAttachment::getCreatedAt)); + //获取关联会议名称 + if (CollectionUtil.isNotEmpty(askAttachmentList)) { + askAttachmentList.stream().forEach(i -> { + if (StrUtil.isNotBlank(i.getConferenceId())) { + Conference conference = conferenceMapper.selectById(i.getConferenceId()); + String conferenceName = ""; + if (conference != null) { + conferenceName = conference.getTitle(); + } + i.setConferenceName(conferenceName); + } + }); + } + + List reportAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper() .eq(ReviewWorkAttachment::getReviewId, reviewWork.getId()) @@ -223,6 +243,7 @@ public class ReviewWorkWrapper extends BaseWrapper { ReviewWorkDto.setInReportAttachmentList(inReportAttachmentList); ReviewWorkDto.setCheckAttachment1List(checkAttachment1List); ReviewWorkDto.setCheckAttachment2List(checkAttachment2List); + ReviewWorkDto.setAskAttachmentList(askAttachmentList); // ReviewWorkDto.setCheckAttachmentList(reviewWorkCheckDtos); ReviewWorkDto.setOpinionAttachmentList(opinionAttachmentList); ReviewWorkDto.setResultAttachmentList(resultAttachmentList);