|
@@ -791,12 +791,17 @@ public class RealExamService {
|
|
|
RealExam q = new RealExam();
|
|
|
q.setUserId(userId);
|
|
|
q.setExamStatus(RealExam.State.NOT_LOGGED_IN);
|
|
|
+ // 该学生所有初始化的考试。
|
|
|
List<RealExam> list = selectRealExamList(q);
|
|
|
if (list.isEmpty()) {
|
|
|
return AjaxResult.success("没有学生考试数据");
|
|
|
}
|
|
|
for (RealExam re : list) {
|
|
|
RealExamCollection rec = realExamCollectionService.selectRealExamCollectionByExamCollectionId(re.getExamCollectionId());
|
|
|
+ if (rec == null) {
|
|
|
+ // 数据不存在,被跳过。
|
|
|
+ continue;
|
|
|
+ }
|
|
|
// 如果考试集合状态是OPENED。理论上只有一个。
|
|
|
// 考虑到一个学员在教室不会有很多场考试。
|
|
|
if (StringUtils.equals(rec.getExamCollectionState(), RealExamCollection.State.OPENED)) { // 考试集合状态是OPENED
|