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

This commit is contained in:
wulin 2020-12-18 11:16:04 +08:00
commit e8c604b22a
2 changed files with 2 additions and 10 deletions

View File

@ -202,18 +202,9 @@ public class ResultTaskServiceImpl extends ServiceImpl<ResultTaskMapper, ResultT
} }
int size = resultTaskDtos.size(); int size = resultTaskDtos.size();
Double rate = 0d; Double rate = 0d;
int cout = 0;
for(ResultTaskDto dto:resultTaskDtos){ for(ResultTaskDto dto:resultTaskDtos){
if(1 == dto.getProcessRate()){
cout++;
continue;
}
rate = BigDecimalUtil.add(rate,dto.getProcessRate()); rate = BigDecimalUtil.add(rate,dto.getProcessRate());
} }
size = size - cout;
if(size < 1){
return 1d;
}
double result = BigDecimalUtil.div(rate, size, 4); double result = BigDecimalUtil.div(rate, size, 4);
return result; return result;

View File

@ -1074,7 +1074,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
} }
String comment = StringUtil.isNotBlank(resultComment.getComment()) ? resultComment.getComment() + "_" : ""; String comment = StringUtil.isNotBlank(resultComment.getComment()) ? resultComment.getComment() + "_" : "";
String optDesc = StringUtil.isNotBlank(resultComment.getOptDesc()) ? resultComment.getOptDesc() + "_" : ""; String optDesc = StringUtil.isNotBlank(resultComment.getOptDesc()) ? resultComment.getOptDesc() + "_" : "";
resultComment.setComment(comment + approvalDto.getComment()); String newComment = StringUtil.isNotBlank(approvalDto.getComment()) ? approvalDto.getComment() : "";
resultComment.setComment(comment + newComment);
resultComment.setStaffName(staffEntity.getName()); resultComment.setStaffName(staffEntity.getName());
resultComment.setStaffId(staffEntity.getId()); resultComment.setStaffId(staffEntity.getId());
resultComment.setRecordId(approvalDto.getResultRecordId()); resultComment.setRecordId(approvalDto.getResultRecordId());