|
@@ -1435,7 +1435,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(tOeExamRecord.getExamStudentId());
|
|
|
Optional.ofNullable(examStudentCacheBean).orElseThrow(() -> new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT));
|
|
|
|
|
|
- JSONObject paperStructJson = null, answerJson = null;
|
|
|
+ JSONObject paperStructJson = null, answerJson = null, randomPaperStructJson = null;
|
|
|
String examStudentAnswerJson = null;
|
|
|
if (Objects.nonNull(teExamPaper.getPaperViewPath())) {
|
|
|
//获取试卷结构json
|
|
@@ -1445,6 +1445,10 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
//获取答案结构json
|
|
|
answerJson = JSONObject.parseObject(new String(ossUtil.download(false, teExamPaper.getAnswerPath()), StandardCharsets.UTF_8));
|
|
|
}
|
|
|
+ if (Objects.nonNull(tOeExamRecord.getPaperStructPath())) {
|
|
|
+ //获取乱序后的试卷结构json
|
|
|
+ randomPaperStructJson = JSONObject.parseObject(new String(ossUtil.download(false, tOeExamRecord.getPaperStructPath()), StandardCharsets.UTF_8));
|
|
|
+ }
|
|
|
|
|
|
QueryWrapper<TOeExamAnswer> tOeExamAnswerQueryWrapper = new QueryWrapper<>();
|
|
|
tOeExamAnswerQueryWrapper.lambda().eq(TOeExamAnswer::getExamRecordId, tOeExamRecord.getId())
|
|
@@ -1466,7 +1470,8 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
tOeExamRecord.getFinishType(),
|
|
|
Objects.nonNull(paperStructJson) ? paperStructJson.toJSONString() : null,
|
|
|
Objects.nonNull(answerJson) ? answerJson.toJSONString() : null,
|
|
|
- examStudentAnswerJson);
|
|
|
+ examStudentAnswerJson,
|
|
|
+ Objects.nonNull(randomPaperStructJson) ? randomPaperStructJson.toJSONString() : null);
|
|
|
}
|
|
|
|
|
|
/**
|