|
@@ -95,15 +95,13 @@ public class GenPaperService {
|
|
|
}
|
|
|
List<PaperDetail> paperDetails = new ArrayList<PaperDetail>();
|
|
|
List<PaperDetailUnit> paperDetailunits = new ArrayList<PaperDetailUnit>();
|
|
|
- Iterator iterator = quesSet.iterator();
|
|
|
-
|
|
|
for (DetailContext dc : detailContexts) {
|
|
|
List<PaperDetailUnit> unitsTemp = new ArrayList<PaperDetailUnit>();
|
|
|
List<UnitContext> units = dc.getUnits();
|
|
|
-
|
|
|
- while(iterator.hasNext()) {
|
|
|
- Question ques = (Question) iterator.next();
|
|
|
- for (UnitContext uc : units) {
|
|
|
+ Iterator iterator = quesSet.iterator();
|
|
|
+ for (UnitContext uc : units) {
|
|
|
+ while(iterator.hasNext()) {
|
|
|
+ Question ques = (Question) iterator.next();
|
|
|
if (uc.getUnitStruct().getQuestionType() == ques.getQuestionType()) {
|
|
|
PaperDetailUnit pdu = new PaperDetailUnit();
|
|
|
pdu.setCreateTime(CommonUtils.getCurDateTime());
|
|
@@ -114,9 +112,7 @@ public class GenPaperService {
|
|
|
iterator.remove();
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
paperDetails.add(this.constuctPaperDeatil(unitsTemp, dc.getDetailStruct().getNumber(),
|
|
|
dc.getDetailStruct().getName()));
|