|
@@ -200,11 +200,11 @@ public class GenPaperService {
|
|
|
int index = (int) (Math.random() * size);
|
|
|
int ranmdomNum = canChooseNestNum.get(index);// 取第一个
|
|
|
if (ranmdomNum == 0) {// 假如随机到0个套题
|
|
|
- selectedUnits = this.getNeedUnits(null, unitList, needQuesNum);
|
|
|
+ selectedUnits.addAll(this.getNeedUnits(null, unitList, needQuesNum));
|
|
|
} else {
|
|
|
List<Integer> sumList = new ArrayList<Integer>();
|
|
|
sumList = CombinationUtils.combiantion(nestQums, needQuesNum, ranmdomNum);
|
|
|
- selectedUnits = this.getNeedUnits(sumList, unitList, needQuesNum);// 有套题情况
|
|
|
+ selectedUnits.addAll(this.getNeedUnits(sumList, unitList, needQuesNum));// 有套题情况
|
|
|
}
|
|
|
} else {
|
|
|
msg = "题源不足,请检查题源";
|