|
@@ -102,22 +102,22 @@ public class GenPaperService {
|
|
long total = (System.currentTimeMillis() - start) / 1000;
|
|
long total = (System.currentTimeMillis() - start) / 1000;
|
|
log.debug("total:"+total);
|
|
log.debug("total:"+total);
|
|
|
|
|
|
- /*for (PaperDetailUnit unit : spareUnits) {
|
|
|
|
|
|
+ for (PaperDetailUnit unit : spareUnits) {
|
|
Question question = unit.getQuestion();
|
|
Question question = unit.getQuestion();
|
|
//根据questionId查询题库中大题来源
|
|
//根据questionId查询题库中大题来源
|
|
- List<PaperDetailUnit> units = unitRepo.findByQuestion(question);
|
|
|
|
|
|
+ /*List<PaperDetailUnit> units = unitRepo.findByQuestion(question);
|
|
for(PaperDetailUnit oldUnit:units){
|
|
for(PaperDetailUnit oldUnit:units){
|
|
Paper paper = oldUnit.getPaper();
|
|
Paper paper = oldUnit.getPaper();
|
|
if(paper.getPaperType() == PaperType.IMPORT){
|
|
if(paper.getPaperType() == PaperType.IMPORT){
|
|
question.setQuesName(oldUnit.getPaperDetail().getName());
|
|
question.setQuesName(oldUnit.getPaperDetail().getName());
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+ question.setQuesName(unit.getPaperDetail().getName());
|
|
questions.add(question);
|
|
questions.add(question);
|
|
- }*/
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- List<Question> oList = new ArrayList<Question>();
|
|
|
|
|
|
+ /*List<Question> oList = new ArrayList<Question>();
|
|
for (PaperDetailUnit unit : spareUnits) {
|
|
for (PaperDetailUnit unit : spareUnits) {
|
|
oList.add(unit.getQuestion());
|
|
oList.add(unit.getQuestion());
|
|
}
|
|
}
|
|
@@ -132,8 +132,8 @@ public class GenPaperService {
|
|
oldUnit.getQuestion().setQuesName(oldUnit.getPaperDetail().getName());
|
|
oldUnit.getQuestion().setQuesName(oldUnit.getPaperDetail().getName());
|
|
}
|
|
}
|
|
questions.add(oldUnit.getQuestion());
|
|
questions.add(oldUnit.getQuestion());
|
|
- }
|
|
|
|
- long total4 = (System.currentTimeMillis() - start4) / 1000;
|
|
|
|
|
|
+ }*/
|
|
|
|
+ long total4 = (System.currentTimeMillis() - start) / 1000;
|
|
log.debug("循环耗时....."+total4);
|
|
log.debug("循环耗时....."+total4);
|
|
Collections.shuffle(questions);
|
|
Collections.shuffle(questions);
|
|
int maxLoopCount = questions.size() * 2;
|
|
int maxLoopCount = questions.size() * 2;
|