提交修改

This commit is contained in:
quyixiao 2020-12-18 10:38:56 +08:00
parent ecc289d9ac
commit 661f9c6d1e
2 changed files with 14 additions and 1 deletions

View File

@ -13,4 +13,5 @@ public class ApprovalDto {
private Long flowRecordId;// 流程 id
private int resetFlag;
private int clearFlag;//0 全清1 还是保留指标
private Long commentId;
}

View File

@ -143,6 +143,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Autowired
private ResultScoreService resultScoreService;
@Override
public ResultRecord selectResultRecordById(Long id) {
return resultRecordMapper.selectResultRecordById(id);
@ -1066,14 +1067,25 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
if (staffEntity != null) {
ResultComment resultComment = new ResultComment();
if(approvalDto.getCommentId() !=null && approvalDto.getCommentId() > 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;
}