|
@@ -296,8 +296,11 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
*/
|
|
|
public Map<String, PaperRuleGroup> getGroupMap(List<PaperQuestion> paperQuestionList) {
|
|
|
List<String> groupIdList = paperQuestionList.stream().map(PaperQuestion::getGroupId).collect(Collectors.toList());
|
|
|
- List<PaperRuleGroup> groupList = paperRuleGroupService.listByIds(groupIdList);
|
|
|
- return groupList.stream().collect(Collectors.toMap(PaperRuleGroup::getId, a -> a, (k1, k2) -> k1));
|
|
|
+ if (!CollectionUtils.isEmpty(groupIdList)) {
|
|
|
+ List<PaperRuleGroup> groupList = paperRuleGroupService.listByIds(groupIdList);
|
|
|
+ return groupList.stream().collect(Collectors.toMap(PaperRuleGroup::getId, a -> a, (k1, k2) -> k1));
|
|
|
+ }
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -734,7 +737,10 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
|
|
|
List<String> combinationIdList = rootExamQuestionList.stream().filter(o -> o.getQuestionType()
|
|
|
.equals(QuestionType.COMBINATION.getCode())).map(UserExamQuestion::getQuestionId).collect(toList());
|
|
|
- List<Question> combinationQuestionList = questionService.listByIds(combinationIdList);
|
|
|
+ List<Question> combinationQuestionList = null;
|
|
|
+ if (!CollectionUtils.isEmpty(combinationIdList)) {
|
|
|
+ combinationQuestionList = questionService.listByIds(combinationIdList);
|
|
|
+ }
|
|
|
if (!CollectionUtils.isEmpty(questionList)) {
|
|
|
resultList.addAll(questionList);
|
|
|
}
|