|
@@ -211,6 +211,9 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
|
add.setExamName(exam.getExamName()+"-"+ServletUtils.getEncoded(""));
|
|
add.setExamName(exam.getExamName()+"-"+ServletUtils.getEncoded(""));
|
|
|
boolean result = this.save(add);
|
|
boolean result = this.save(add);
|
|
|
Collection<ExamSimulateQuestion> coll = new HashSet<>();
|
|
Collection<ExamSimulateQuestion> coll = new HashSet<>();
|
|
|
|
|
+ if(allQ.size()==0){
|
|
|
|
|
+ throw new CustomException("试卷题目已做完");
|
|
|
|
|
+ }
|
|
|
for(int i=0;i<allQ.size();i++){
|
|
for(int i=0;i<allQ.size();i++){
|
|
|
ExamSimulateQuestion addItem = new ExamSimulateQuestion();
|
|
ExamSimulateQuestion addItem = new ExamSimulateQuestion();
|
|
|
addItem.setSimulateExamId(add.getSimulateExamId());
|
|
addItem.setSimulateExamId(add.getSimulateExamId());
|
|
@@ -219,7 +222,7 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
|
coll.add(addItem);
|
|
coll.add(addItem);
|
|
|
}
|
|
}
|
|
|
if(!iExamSimulateQuestionService.saveBatch(coll)){
|
|
if(!iExamSimulateQuestionService.saveBatch(coll)){
|
|
|
- throw new CustomException("试卷绑定错误");
|
|
|
|
|
|
|
+ throw new CustomException("试卷题目已做完");
|
|
|
}
|
|
}
|
|
|
ExamSimulateVo examSimulateVo = BeanUtil.toBean(add, ExamSimulateVo.class);
|
|
ExamSimulateVo examSimulateVo = BeanUtil.toBean(add, ExamSimulateVo.class);
|
|
|
ExamSimulateQueryBo questionQueryBo = new ExamSimulateQueryBo();
|
|
ExamSimulateQueryBo questionQueryBo = new ExamSimulateQueryBo();
|