|
|
@@ -392,9 +392,14 @@ public class ExamService {
|
|
|
}
|
|
|
existPaperIdSet.add(e.getPaperId());
|
|
|
}
|
|
|
+ LearnPaper paper = getBestPaper(sysUser.getExamType(), plan, subjectId, existPaperIdSet);
|
|
|
+ examinee.setPaperId(paper.getId());
|
|
|
+ examinee.setState(ExamineeStatus.Sign.getVal());
|
|
|
+ examinee.setDuration(0L);
|
|
|
+
|
|
|
JSONObject evalCountObj = JSONObject.parseObject(sysUser.getEvalCounts());
|
|
|
Integer evalCount = evalCountObj.getInteger(subjectId.toString());
|
|
|
- if(null == evalCount || existPaperIdSet.size() >= evalCount) {
|
|
|
+ if(null == evalCount || evalCount <= 0) {
|
|
|
throw new ValidationException("超过最大次数限制" + evalCount );
|
|
|
}
|
|
|
SysUser upUser = new SysUser();
|
|
|
@@ -403,12 +408,6 @@ public class ExamService {
|
|
|
upUser.setEvalCounts(evalCountObj.toJSONString());
|
|
|
sysUserService.updateUserProfile(upUser);
|
|
|
|
|
|
- existPaperIdSet.clear(); // TODO 临时清除重复检查
|
|
|
- LearnPaper paper = getBestPaper(sysUser.getExamType(), plan, subjectId, existPaperIdSet);
|
|
|
- examinee.setPaperId(paper.getId());
|
|
|
- examinee.setState(ExamineeStatus.Sign.getVal());
|
|
|
- examinee.setDuration(0L);
|
|
|
-
|
|
|
JSONObject info = new JSONObject();
|
|
|
info.put("universityId", ls.getUniversityId());
|
|
|
info.put("universityName", plan.getUniversityName());
|