|
@@ -480,7 +480,10 @@ public class ExamService {
|
|
|
List<LearnExaminee> examineeList = examineeMapper.selectLearnExamineeList(examinee);
|
|
List<LearnExaminee> examineeList = examineeMapper.selectLearnExamineeList(examinee);
|
|
|
if(CollectionUtils.isNotEmpty(examineeList)) {
|
|
if(CollectionUtils.isNotEmpty(examineeList)) {
|
|
|
LearnExaminee exist = examineeList.get(0);
|
|
LearnExaminee exist = examineeList.get(0);
|
|
|
- return buildAnswerSheet(learnPaper, exist, loadQuestionAnswers(exist, exist.getState() < ExamineeStatus.Commit.getVal()));
|
|
|
|
|
|
|
+ if(exist.getState() >= ExamineeStatus.Commit.getVal()) {
|
|
|
|
|
+ throw new ValidationException("试卷不能重复打开做, 请查问答卷");
|
|
|
|
|
+ }
|
|
|
|
|
+ return buildAnswerSheet(learnPaper, exist, loadQuestionAnswers(exist, true));
|
|
|
}
|
|
}
|
|
|
return openNewExamineeByPaper(examinee, learnPaper);
|
|
return openNewExamineeByPaper(examinee, learnPaper);
|
|
|
}
|
|
}
|
|
@@ -488,6 +491,9 @@ public class ExamService {
|
|
|
examinee.setPaperId(paper.getId());
|
|
examinee.setPaperId(paper.getId());
|
|
|
examinee.setState(ExamineeStatus.Sign.getVal());
|
|
examinee.setState(ExamineeStatus.Sign.getVal());
|
|
|
examinee.setDuration(0L);
|
|
examinee.setDuration(0L);
|
|
|
|
|
+ JSONObject info = new JSONObject();
|
|
|
|
|
+ info.put("paperName", paper.getPaperName());
|
|
|
|
|
+ examinee.setPaperInfo(info.toJSONString());
|
|
|
examineeMapper.insertLearnExaminee(examinee);
|
|
examineeMapper.insertLearnExaminee(examinee);
|
|
|
AnswerSheet answerSheet = buildAnswerSheet(paper, examinee, null);
|
|
AnswerSheet answerSheet = buildAnswerSheet(paper, examinee, null);
|
|
|
answerSheet.setSubjectId(paper.getSubjectId());
|
|
answerSheet.setSubjectId(paper.getSubjectId());
|