|
@@ -256,23 +256,22 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
log.debug("6 保存考试试卷结构耗时:" + (System.currentTimeMillis() - startTime) + " ms");
|
|
|
}
|
|
|
|
|
|
- // 更新考生信息
|
|
|
+ // 更新考生信息,并返回已考的考试次数
|
|
|
startTime = System.currentTimeMillis();
|
|
|
- examStudentService.updateExamStudentByStartExam(originalExamStudent.getId(),
|
|
|
+
|
|
|
+ int examedTimes = examStudentService.updateExamStudentByStartExam(originalExamStudent.getId(),
|
|
|
originalExamStudent.getIsReExamine(), originalExamStudent.getReExamineCompleted(),
|
|
|
originalExamStudent.getNormalExamTimes(), examBean);
|
|
|
if (log.isDebugEnabled()) {
|
|
|
log.debug("7 更新考生信息耗时:" + (System.currentTimeMillis() - startTime) + " ms");
|
|
|
}
|
|
|
- //获取更新完以后的考试记录实体
|
|
|
- ExamStudentEntity newExamStudent = GlobalHelper.getEntity(examStudentRepo, originalExamStudent.getId(), ExamStudentEntity.class);
|
|
|
|
|
|
// 生成考试记录
|
|
|
startTime = System.currentTimeMillis();
|
|
|
- ExamRecordEntity examRecord = examRecordService.createExamRecord(newExamStudent, examBean, courseBean,
|
|
|
+ ExamRecordEntity examRecord = examRecordService.createExamRecord(originalExamStudent, examBean, courseBean,
|
|
|
paperId, examRecordPaperStruct.getId());
|
|
|
ExamRecordDataEntity examRecordData = examRecordDataService.createExamRecordData(examRecord,
|
|
|
- newExamStudent.getNormalExamTimes(), examBean.getExamTimes(), originalExamStudent.getIsReExamine(),
|
|
|
+ examedTimes, examBean.getExamTimes(), originalExamStudent.getIsReExamine(),
|
|
|
extractConfigPaper.getDefaultPaper().getFullyObjective());
|
|
|
|
|
|
//生成进行中的考试记录
|
|
@@ -302,7 +301,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
// 创建考试会话
|
|
|
startTime = System.currentTimeMillis();
|
|
|
|
|
|
- initializeExamRecordSession(newExamStudent, examRecordData, examBean);
|
|
|
+ initializeExamRecordSession(originalExamStudent, examRecordData, examBean);
|
|
|
if (log.isDebugEnabled()) {
|
|
|
log.debug("11 创建考试会话耗时:" + (System.currentTimeMillis() - startTime) + " ms");
|
|
|
}
|
|
@@ -310,7 +309,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
if (log.isDebugEnabled()) {
|
|
|
log.debug("12 合计 耗时:" + (System.currentTimeMillis() - st) + " ms");
|
|
|
}
|
|
|
- return buildStartExamInfo(examRecordData.getId(), newExamStudent, examBean, courseBean);
|
|
|
+ return buildStartExamInfo(examRecordData.getId(), originalExamStudent, examBean, courseBean);
|
|
|
// } finally {
|
|
|
//
|
|
|
// }
|