|
@@ -9,7 +9,6 @@ import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
-import com.qmth.cqb.utils.enums.PaperType;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -27,6 +26,7 @@ import com.qmth.cqb.paper.model.PaperDetailUnit;
|
|
import com.qmth.cqb.paper.model.PaperStruct;
|
|
import com.qmth.cqb.paper.model.PaperStruct;
|
|
import com.qmth.cqb.question.model.Question;
|
|
import com.qmth.cqb.question.model.Question;
|
|
import com.qmth.cqb.utils.CommonUtils;
|
|
import com.qmth.cqb.utils.CommonUtils;
|
|
|
|
+import com.qmth.cqb.utils.enums.PaperType;
|
|
|
|
|
|
import cn.com.qmth.examcloud.common.dto.question.enums.QuesStructType;
|
|
import cn.com.qmth.examcloud.common.dto.question.enums.QuesStructType;
|
|
|
|
|
|
@@ -199,7 +199,7 @@ public class GenPaperService {
|
|
if (quesNum < unitNum && (!tempUnits.contains(unit))) {
|
|
if (quesNum < unitNum && (!tempUnits.contains(unit))) {
|
|
tempUnits.add(unit);
|
|
tempUnits.add(unit);
|
|
}
|
|
}
|
|
- if (tempUnits.size() == unitNum) {
|
|
|
|
|
|
+ if (this.getTotalQuesNum(tempUnits) == unitNum) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -318,7 +318,8 @@ public class GenPaperService {
|
|
for (QuesStructType qType : unitMap.keySet()) {
|
|
for (QuesStructType qType : unitMap.keySet()) {
|
|
details.add(this.constuctPaperDeatil(unitMap.get(qType), qTypeIndexMap.get(qType), qType.getName()));
|
|
details.add(this.constuctPaperDeatil(unitMap.get(qType), qTypeIndexMap.get(qType), qType.getName()));
|
|
}
|
|
}
|
|
- Paper paper = this.persistentPaper(selectedUnits, details,this.constuctPaperByPaperDetails(details, genPaperDto));
|
|
|
|
|
|
+ Paper paper = this.persistentPaper(selectedUnits, details,
|
|
|
|
+ this.constuctPaperByPaperDetails(details, genPaperDto));
|
|
return paper;
|
|
return paper;
|
|
|
|
|
|
}
|
|
}
|