提交修改
This commit is contained in:
parent
4e2976fe54
commit
03028ba53b
@ -884,13 +884,18 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
}
|
||||
|
||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(), 2);
|
||||
Long commentId = 0l;
|
||||
if (CollectionUtils.isNotEmpty(flowRecords)) {
|
||||
FlowRecord preFlowRecord = flowRecords.get(0);
|
||||
// 评论内容
|
||||
FlowChart flowChart = flowService.selectFlowChartByChartId(preFlowRecord.getFlowId());
|
||||
comment(approvalDto, flowChart);
|
||||
commentId = comment(approvalDto, flowChart);
|
||||
}
|
||||
R r = apply(approvalDto);
|
||||
return r.put("commentId",commentId);
|
||||
}
|
||||
|
||||
public R apply( ApprovalDto approvalDto){
|
||||
switch (approvalDto.getStatus()) {
|
||||
case 1: //1 提交审批,审批通过
|
||||
return newSubmit(approvalDto, null);
|
||||
@ -920,7 +925,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@ -1029,7 +1034,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
return newReject(approvalDto);
|
||||
}
|
||||
|
||||
public void comment(ApprovalDto approvalDto, FlowChart flowChart) {
|
||||
public Long comment(ApprovalDto approvalDto, FlowChart flowChart) {
|
||||
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
|
||||
if (staffEntity != null) {
|
||||
ResultComment resultComment = new ResultComment();
|
||||
@ -1039,7 +1044,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
resultComment.setRecordId(approvalDto.getResultRecordId());
|
||||
resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName());
|
||||
resultCommentService.insertResultComment(resultComment);
|
||||
return resultComment.getId();
|
||||
}
|
||||
return 0l;
|
||||
}
|
||||
|
||||
private R newSubmit(ApprovalDto approvalDto, Integer finishedStatus) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user