|
|
@@ -949,7 +949,7 @@ public class PaperService {
|
|
|
}
|
|
|
}
|
|
|
if(CollectionUtils.isEmpty(pqList)) {
|
|
|
- throw new RuntimeException("题数不足");
|
|
|
+ throw new RuntimeException("题数不足2");
|
|
|
}
|
|
|
reSort(pqList);
|
|
|
return pqList;
|
|
|
@@ -985,7 +985,7 @@ public class PaperService {
|
|
|
}
|
|
|
if(ktc.assign > 0L) {
|
|
|
qCond.setId(null);
|
|
|
- qCond.setNumber(ktc.assign > 500 ? (long) random.nextInt(ktc.assign.intValue() - 500) : 0L);
|
|
|
+ qCond.setNumber(ktc.assign > 1000 ? (long) random.nextInt(ktc.assign.intValue() - 1000) : 0L);
|
|
|
List<LearnQuestions> questions = questionsMapper.selectQuestionsForPaper(qCond);
|
|
|
ktc.assign = addRandomList(knowId, typeDef.getType(), questions, random, total.longValue(), ktc.assign, typeDef.getScore(), existQuestionSet, seqId, pqList);
|
|
|
if(pqList.size() == total) {
|
|
|
@@ -998,7 +998,7 @@ public class PaperService {
|
|
|
}
|
|
|
}
|
|
|
if(pqList.size() < total) {
|
|
|
- throw new RuntimeException("题数不足 " + types.stream().map( t -> t.getType().getTitle()).collect(Collectors.joining(",")) + ":" + StringUtils.join(knownIds, ","));
|
|
|
+ throw new RuntimeException("题数不足3 " + types.stream().map( t -> t.getType().getTitle()).collect(Collectors.joining(",")) + ":" + StringUtils.join(knownIds, ","));
|
|
|
}
|
|
|
return pqList;
|
|
|
}
|