题库导入修改

This commit is contained in:
pengjie 2024-06-02 17:56:10 +08:00
parent 583806972a
commit cb312b1ed2

View File

@ -394,6 +394,7 @@ public class ExamQuestionBankController {
List<ExamQuestionOption> examQuestionOptionList = new ArrayList<>();
int index = 0;
for (ExamQuestionBankImport examQuestionBankImport : examQuestionBankImports) {
if (StringUtils.isNotBlank(examQuestionBankImport.getQuestionName())) {
if (StringUtils.isNotBlank(examQuestionBankImport.getIndex())) {
index++;
List<ExamSubject> subjects = subList.stream().filter(s -> s.getName().equals(examQuestionBankImport.getSubjectName())).collect(Collectors.toList());
@ -423,6 +424,7 @@ public class ExamQuestionBankController {
examQuestionOptionList.add(examQuestionOption);
}
}
}
for (ExamQuestionBank examQuestionBank : examQuestionBankList) {
ExamQuestionBankVo examQuestionBankVo = new ExamQuestionBankVo();
List<ExamQuestionOption> collect = examQuestionOptionList.stream().filter(e -> e.getQuestionId().toString().equals(examQuestionBank.getId().toString())).collect(Collectors.toList());