jinlin
2023-12-29 a4f932c6ca705feb3bee3b7d7bbe0ee5c0c85515
modules/mainPart/src/main/java/com/zt/life/modules/testReviewComment/service/TestReviewCommentService.java
@@ -9,6 +9,7 @@
import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark;
import com.zt.life.modules.baselineRelease.service.BaselineReleaseRemarkService;
import com.zt.life.modules.project.service.ProjectService;
import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService;
import com.zt.life.modules.testReviewComment.dao.TestReviewCommentDao;
import com.zt.life.modules.testReviewComment.dto.ReviewCommentDto;
import com.zt.life.modules.testReviewComment.model.TestReviewComment;
@@ -50,6 +51,9 @@
    @Autowired
    private WordFileService wordFileService;
    @Autowired
    private TestAgencyInfoService testAgencyInfoService;
    /**
     * 分页查询
     *
@@ -76,7 +80,6 @@
    public ReviewCommentDto getDto(Long commentId, Long projectId, String pageCode) {
        ReviewCommentDto data = new ReviewCommentDto();
        data.setPageCode(pageCode);
        if (commentId != null) {
            data.setId(commentId);
            TestReviewComment reviewComment = this.get(commentId);
@@ -86,7 +89,6 @@
            }
        } else {
            TestReviewComment reviewComment = new TestReviewComment();
            reviewComment.setPageCode(pageCode);
            data.setReviewComment(reviewComment);
        }
        if (projectId != null) {
@@ -95,17 +97,13 @@
        }
        return data;
    }
    public Long save(ReviewCommentDto reviewCommentDto) {
        Long commentId = reviewCommentDto.getReviewComment().getId();
        if (commentId != null)
            baseDao.updateById(reviewCommentDto.getReviewComment());
        else {
            Map<String, String> map = new HashMap<>();
            String pagecode = reviewCommentDto.getPageCode();
            map.put("funCode", "test_review_comment_" + pagecode);
            map.put("projectId", reviewCommentDto.getProjectId().toString());
            reviewCommentDto.getReviewComment().setProjectId(reviewCommentDto.getProjectId());
            reviewCommentDto.getReviewComment().setCode(sysCodeRuleService.getNewCode(map));
            baseDao.insert(reviewCommentDto.getReviewComment());
            commentId = reviewCommentDto.getReviewComment().getId();
        }