Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
杜建超 2020-12-18 10:54:16 +08:00
commit b151f8a9ec
4 changed files with 27 additions and 16 deletions

View File

@ -468,7 +468,7 @@ public class ResultRecordController extends AbstractController {
List<FlowChartDetailRecord> flowChartDetailRecords = List<FlowChartDetailRecord> flowChartDetailRecords =
flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), ChartFlowType.SCORE.getCode());//获取参与评分的人 flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), ChartFlowType.SCORE.getCode());//获取参与评分的人
//List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdFlowProcess(resultRecord.getId(), ChartFlowType.SCORE.getCode()); List<FlowRecord> flowRecords1 = flowRecordService.selectFlowRecordByRecordIdFlowProcess(resultRecord.getId(), ChartFlowType.SCORE.getCode());
List<StaffEntity> staffs = new ArrayList<>(); List<StaffEntity> staffs = new ArrayList<>();
Boolean isAllScore = true;//false表示返回所有的评分true表示值返回评分了的人 Boolean isAllScore = true;//false表示返回所有的评分true表示值返回评分了的人
Boolean isOrScore = false;//是否为或签 Boolean isOrScore = false;//是否为或签
@ -987,8 +987,8 @@ public class ResultRecordController extends AbstractController {
} }
resultRecordService.updateResultRecordById(resultRecord); resultRecordService.updateResultRecordById(resultRecord);
String commentId = null;
if(dto.getCommentId() != null && dto.getCommentId().intValue() > 0){ if(dto.getSave() == null && editResultDetails.size() > 0){//非暂存
//修改评论信息 //修改评论信息
log.info("修改了多少个指标{}", editResultDetails.size()); log.info("修改了多少个指标{}", editResultDetails.size());
editResultDetails.addAll(resultDetailService.selectNotNoticeResultDetailByRecordId(dto.getId())) ; editResultDetails.addAll(resultDetailService.selectNotNoticeResultDetailByRecordId(dto.getId())) ;
@ -1058,17 +1058,13 @@ public class ResultRecordController extends AbstractController {
} }
if(commandValue.length() > 0){ if(commandValue.length() > 0){
log.info("需要写入评论,具体呢容为{}", commandValue); log.info("需要写入评论,具体呢容为{}", commandValue);
ResultComment resultComment = resultCommentService.selectResultCommentById(dto.getCommentId()); ResultComment resultComment = new ResultComment();//resultCommentService.selectResultCommentById(dto.getCommentId());
log.info("resultComment的值{}", resultComment); log.info("resultComment的值{}", resultComment);
if(resultComment.getOptDesc().indexOf("制定了目标") >= 0){ resultComment.setOptDesc("修改了目标");
resultComment.setOptDesc("修改了目标"); resultComment.setComment(commandValue);
resultComment.setComment(commandValue);
}else{
resultComment.setOptDesc("修改了目标-" + resultComment.getOptDesc());
resultComment.setComment((resultComment.getComment() == null ? "" : (resultComment.getComment() + "\n")) + commandValue); resultCommentService.insertResultComment(resultComment);//.updateResultCommentCommentById(dto.getCommentId(), commandValue);
} commentId = resultComment.getId().toString();
resultCommentService.updateResultCommentById(resultComment);//.updateResultCommentCommentById(dto.getCommentId(), commandValue);
} }
} }
}else{ }else{
@ -1084,7 +1080,7 @@ public class ResultRecordController extends AbstractController {
resultDetailService.updateBatchById(editResultDetails); resultDetailService.updateBatchById(editResultDetails);
} }
return R.ok(); return R.ok().put("commentId", commentId);
} }
/** /**

View File

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

View File

@ -101,6 +101,7 @@ public class ResultRecordDetailDto {
@ApiModelProperty(value = "职位", name = "position") @ApiModelProperty(value = "职位", name = "position")
private String position; private String position;
/** /**
* *
* @return * @return

View File

@ -143,6 +143,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Autowired @Autowired
private ResultScoreService resultScoreService; private ResultScoreService resultScoreService;
@Override @Override
public ResultRecord selectResultRecordById(Long id) { public ResultRecord selectResultRecordById(Long id) {
return resultRecordMapper.selectResultRecordById(id); return resultRecordMapper.selectResultRecordById(id);
@ -1067,12 +1068,24 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId()); StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
if (staffEntity != null) { if (staffEntity != null) {
ResultComment resultComment = new ResultComment(); ResultComment resultComment = new ResultComment();
resultComment.setComment(approvalDto.getComment()); if(approvalDto.getCommentId() !=null && approvalDto.getCommentId() > 0 ){
log.info("更新前评论commentId=" + approvalDto.getCommentId());
resultComment = resultCommentService.selectResultCommentById(approvalDto.getCommentId());
}
String comment = StringUtil.isNotBlank(resultComment.getComment()) ? resultComment.getComment() + "_" : "";
String optDesc = StringUtil.isNotBlank(resultComment.getOptDesc()) ? resultComment.getOptDesc() + "_" : "";
resultComment.setComment(comment + approvalDto.getComment());
resultComment.setStaffName(staffEntity.getName()); resultComment.setStaffName(staffEntity.getName());
resultComment.setStaffId(staffEntity.getId()); resultComment.setStaffId(staffEntity.getId());
resultComment.setRecordId(approvalDto.getResultRecordId()); resultComment.setRecordId(approvalDto.getResultRecordId());
resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName()); resultComment.setOptDesc(optDesc + 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 resultComment.getId();
} }
return 0l; return 0l;