|
@@ -134,8 +134,8 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
|
|
|
|
ExamSimulateQueryBo qk4Bo = new ExamSimulateQueryBo(); //判断题选知识点
|
|
ExamSimulateQueryBo qk4Bo = new ExamSimulateQueryBo(); //判断题选知识点
|
|
qk4Bo.setExamId(exam.getExamId());
|
|
qk4Bo.setExamId(exam.getExamId());
|
|
- qk4Bo.setKnowledIds(simulateConfig.getTrueFalseQuestion().getKnowledIds());
|
|
|
|
- qk4Bo.setKnum(simulateConfig.getTrueFalseQuestion().getKnum());
|
|
|
|
|
|
+ qk4Bo.setKnowledIds(Validator.isNotEmpty(simulateConfig.getTrueFalseQuestion())?simulateConfig.getTrueFalseQuestion().getKnowledIds():new ArrayList<>());
|
|
|
|
+ qk4Bo.setKnum(Validator.isNotEmpty(simulateConfig.getTrueFalseQuestion())?simulateConfig.getTrueFalseQuestion().getKnum():0);
|
|
qk4Bo.setType(3);
|
|
qk4Bo.setType(3);
|
|
qk4Bo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
qk4Bo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
qk4Bo.setFromType(bo.getFrom());
|
|
qk4Bo.setFromType(bo.getFrom());
|
|
@@ -144,7 +144,13 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
List<Long> w1 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getSingleChoice().getQnum()-qk1.size()),qk1,1);//单选错题
|
|
List<Long> w1 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getSingleChoice().getQnum()-qk1.size()),qk1,1);//单选错题
|
|
List<Long> w2 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getMultipleChoice().getQnum()-qk2.size()),qk2,2);//多选错题
|
|
List<Long> w2 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getMultipleChoice().getQnum()-qk2.size()),qk2,2);//多选错题
|
|
List<Long> w3 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getCaseQuestion().getQnum()-qk3.size()),qk3,4);//案例错题
|
|
List<Long> w3 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getCaseQuestion().getQnum()-qk3.size()),qk3,4);//案例错题
|
|
- List<Long> w4 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getTrueFalseQuestion().getQnum()-qk4.size()),qk4,3);//判断错题
|
|
|
|
|
|
+ List<Long> w4 = null;
|
|
|
|
+ if(Validator.isNotEmpty(simulateConfig.getTrueFalseQuestion())){
|
|
|
|
+ w4 = getWrongQuestion(bo.getOrderGoodsId(),bo.getExamId(),bo.getFrom(),simulateConfig.getType(),(simulateConfig.getTrueFalseQuestion().getQnum()-qk4.size()),qk4,3);//判断错题
|
|
|
|
+ }else{
|
|
|
|
+ w4 = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
ExamSimulateQueryBo q1Bo = new ExamSimulateQueryBo(); //单选
|
|
ExamSimulateQueryBo q1Bo = new ExamSimulateQueryBo(); //单选
|
|
q1Bo.setExamId(exam.getExamId());
|
|
q1Bo.setExamId(exam.getExamId());
|
|
@@ -182,7 +188,11 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
q4Bo.setExamId(exam.getExamId());
|
|
q4Bo.setExamId(exam.getExamId());
|
|
q4Bo.setKnowledQuestionIds(qk4);
|
|
q4Bo.setKnowledQuestionIds(qk4);
|
|
q4Bo.setWrongQuestionIds(w4);
|
|
q4Bo.setWrongQuestionIds(w4);
|
|
- q4Bo.setQnum(simulateConfig.getTrueFalseQuestion().getQnum()-qk4.size()- w4.size());
|
|
|
|
|
|
+ if(Validator.isNotEmpty(simulateConfig.getTrueFalseQuestion())){
|
|
|
|
+ q4Bo.setQnum(simulateConfig.getTrueFalseQuestion().getQnum()-qk4.size()- w4.size());
|
|
|
|
+ }else{
|
|
|
|
+ q4Bo.setQnum(0);
|
|
|
|
+ }
|
|
q4Bo.setType(3);
|
|
q4Bo.setType(3);
|
|
q4Bo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
q4Bo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
q4Bo.setFromType(bo.getFrom());
|
|
q4Bo.setFromType(bo.getFrom());
|
|
@@ -211,7 +221,7 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
if(simulateConfig.getCaseQuestion().getOrderNum()==i){
|
|
if(simulateConfig.getCaseQuestion().getOrderNum()==i){
|
|
allQ.addAll(qk3);
|
|
allQ.addAll(qk3);
|
|
}
|
|
}
|
|
- if(simulateConfig.getTrueFalseQuestion().getOrderNum()==i){
|
|
|
|
|
|
+ if(Validator.isNotEmpty(simulateConfig.getTrueFalseQuestion())&&simulateConfig.getTrueFalseQuestion().getOrderNum()==i){
|
|
allQ.addAll(qk4);
|
|
allQ.addAll(qk4);
|
|
}
|
|
}
|
|
}
|
|
}
|