diff --git a/src/main/java/com/lz/modules/app/dto/ApprovalDto.java b/src/main/java/com/lz/modules/app/dto/ApprovalDto.java index 0181ebbe..edc4e6a4 100644 --- a/src/main/java/com/lz/modules/app/dto/ApprovalDto.java +++ b/src/main/java/com/lz/modules/app/dto/ApprovalDto.java @@ -13,4 +13,5 @@ public class ApprovalDto { private Long flowRecordId;// 流程 id private int resetFlag; private int clearFlag;//0 全清,1 还是保留指标 + private Long commentId; } diff --git a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java index ede99e92..809e9ad7 100644 --- a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java +++ b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java @@ -143,6 +143,7 @@ public class ResultRecordServiceImpl extends ServiceImpl 0 ){ + log.info("更新前评论commentId=" + approvalDto.getCommentId()); + resultComment = resultCommentService.selectResultCommentById(approvalDto.getCommentId()); + } resultComment.setComment(approvalDto.getComment()); resultComment.setStaffName(staffEntity.getName()); resultComment.setStaffId(staffEntity.getId()); resultComment.setRecordId(approvalDto.getResultRecordId()); resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName()); - resultCommentService.insertResultComment(resultComment); + if(approvalDto.getCommentId() !=null && approvalDto.getCommentId() > 0 ){ + resultCommentService.updateResultCommentById(resultComment); + log.info("更新后评论commentId=" + resultComment.getId()); + }else{ + resultCommentService.insertResultComment(resultComment); + log.info("插入后评论commentId=" + resultComment.getId()); + } return resultComment.getId(); } + return 0l; }