|
@@ -243,6 +243,12 @@ public class PaperController extends BaseExamController {
|
|
|
for (MarkGroup markGroup : groups) {
|
|
|
maps.put(markGroup.getNumber(), markGroup);
|
|
|
}
|
|
|
+ List<SelectiveGroup> selectiveGroups = selectiveGroupService.findByExamIdAndSubjectCode(examId,
|
|
|
+ subjectCode);
|
|
|
+ Map<Integer, SelectiveGroup> selectiveMap = new HashMap<Integer, SelectiveGroup>();
|
|
|
+ for (SelectiveGroup selectiveGroup : selectiveGroups) {
|
|
|
+ selectiveMap.put(selectiveGroup.getMainNumber(), selectiveGroup);
|
|
|
+ }
|
|
|
List<ExamQuestion> subjectiveList = mainNumber == null ? questionService
|
|
|
.findByExamAndSubjectAndObjective(examId, subjectCode, false) : questionService
|
|
|
.findByExamAndSubjectAndObjectiveAndMainNumber(examId, subjectCode, false, mainNumber);
|
|
@@ -253,6 +259,18 @@ public class PaperController extends BaseExamController {
|
|
|
} else {
|
|
|
examQuestion.setEnableUpdate(true);
|
|
|
}
|
|
|
+ // 选做题判分策略
|
|
|
+ if (selectiveMap.containsKey(examQuestion.getMainNumber())) {
|
|
|
+ examQuestion.setSelective(true);
|
|
|
+ examQuestion.setSelectiveIndex(selectiveMap.get(examQuestion.getMainNumber())
|
|
|
+ .getSelectiveIndex());
|
|
|
+ examQuestion
|
|
|
+ .setSelectivePart(selectiveMap.get(examQuestion.getMainNumber()).getSelectivePart());
|
|
|
+ examQuestion.setScorePolicy(selectiveMap.get(examQuestion.getMainNumber()).getScorePolicy()
|
|
|
+ .getValue());
|
|
|
+ } else {
|
|
|
+ examQuestion.setSelective(false);
|
|
|
+ }
|
|
|
}
|
|
|
list.addAll(subjectiveList);
|
|
|
}
|