Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
d6492015c5
@ -776,24 +776,25 @@ public class ResultRecordController extends AbstractController {
|
||||
|
||||
}
|
||||
|
||||
if(!resultDetail.getCheckResult().equals(resultDetail1.getCheckResult())){
|
||||
if(!resultDetail.getKeyResult().equals(resultDetail1.getKeyResult())){
|
||||
//打上标识
|
||||
isUp = true;
|
||||
resultDetail1.setCheckResult("<s>" + resultDetail1.getCheckResult() + "</s>");
|
||||
resultDetail1.setKeyResult("<s>" + resultDetail1.getKeyResult() + "</s>");
|
||||
}
|
||||
if(resultDetail.getIsDelete().intValue() == 1){//被删除了
|
||||
resultDetail.setIsDelete(0);
|
||||
isUp = true;
|
||||
}
|
||||
|
||||
if(!resultDetail.getCheckWeight().equals(resultDetail1.getCheckWeight())){
|
||||
//打上标识
|
||||
isUp = true;
|
||||
|
||||
//resultDetail1.setTarget("<s>" + resultDetail1.getTarget() + "</s>");
|
||||
}
|
||||
if(isUp){
|
||||
resultDetail1.setId(null);
|
||||
resultDetail1.setIsBack(1);
|
||||
resultDetail1.setTarget("<s>" + resultDetail1.getTarget() + "</s>");
|
||||
resultDetail1.setBackId(resultDetail.getId());
|
||||
inserts.add(resultDetail);
|
||||
inserts.add(resultDetail1);
|
||||
}
|
||||
}
|
||||
resultDetail.setPriority(index);
|
||||
@ -828,7 +829,6 @@ public class ResultRecordController extends AbstractController {
|
||||
}
|
||||
resultDetail.setAcquireScore(score);
|
||||
weight = weight.add(resultDetail.getCheckWeight());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,6 +33,8 @@ public class ResultRecordDetailDto {
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注", name = "remark")
|
||||
private String remark;
|
||||
@ApiModelProperty(value = "业绩评论id", name = "commandId")
|
||||
private Long commandId;
|
||||
//员工id
|
||||
@ApiModelProperty(value = "员工id", name = "staffId")
|
||||
private Long staffId;
|
||||
|
||||
@ -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