|
@@ -182,13 +182,13 @@ public class UserMockRecordServiceImpl extends ServiceImpl<UserMockRecordMapper,
|
|
|
public Boolean updateByEditBo(UserMockRecordEditBo bo) {
|
|
public Boolean updateByEditBo(UserMockRecordEditBo bo) {
|
|
|
UserMockRecord update = BeanUtil.toBean(bo, UserMockRecord.class);
|
|
UserMockRecord update = BeanUtil.toBean(bo, UserMockRecord.class);
|
|
|
//计算试卷总分
|
|
//计算试卷总分
|
|
|
- if (ObjectUtils.isEmpty(bo.getExamId())) {
|
|
|
|
|
- List<ExamQuestion> list = iExamQuestionService.list(new LambdaQueryWrapper<ExamQuestion>().eq(ExamQuestion::getExamId, bo.getExamId()));
|
|
|
|
|
- if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
|
- BigDecimal reduce = list.stream().filter(x -> ObjectUtils.isNotNull(x.getScore())).map(ExamQuestion::getScore).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
- update.setTotalScore(reduce);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (ObjectUtils.isEmpty(bo.getExamId())) {
|
|
|
|
|
+// List<ExamQuestion> list = iExamQuestionService.list(new LambdaQueryWrapper<ExamQuestion>().eq(ExamQuestion::getExamId, bo.getExamId()));
|
|
|
|
|
+// if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
|
+// BigDecimal reduce = list.stream().filter(x -> ObjectUtils.isNotNull(x.getScore())).map(ExamQuestion::getScore).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+// update.setTotalScore(reduce);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
return this.updateById(update);
|
|
return this.updateById(update);
|