|
@@ -1539,7 +1539,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
// 客观题成绩分析
|
|
// 客观题成绩分析
|
|
- fillObjective(ret, studentList, query.getExamId(), query.getPaperNumber());
|
|
|
|
|
|
+ fillObjective(ret, studentList, markPaper);
|
|
|
|
|
|
// 主观题成绩分析
|
|
// 主观题成绩分析
|
|
List<Long> studentIds = studentList.stream().map(ArchiveStudentVo::getStudentId).collect(Collectors.toList());
|
|
List<Long> studentIds = studentList.stream().map(ArchiveStudentVo::getStudentId).collect(Collectors.toList());
|
|
@@ -1714,9 +1714,26 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
return this.update(updateWrapper);
|
|
return this.update(updateWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
- private void fillObjective(ScoreReportVo ret, List<ArchiveStudentVo> studentList, Long examId, String
|
|
|
|
- paperNumber) {
|
|
|
|
- List<MarkQuestion> qs = markQuestionService.listByExamIdAndPaperNumberAndObjective(examId, paperNumber, true);
|
|
|
|
|
|
+
|
|
|
|
+ private void fillObjective(ScoreReportVo ret, List<ArchiveStudentVo> studentList, MarkPaper markPaper) {
|
|
|
|
+ Long examId = markPaper.getExamId();
|
|
|
|
+ String paperNumber = markPaper.getPaperNumber();
|
|
|
|
+ List<MarkQuestion> qs;
|
|
|
|
+ if (markPaper.getArchive()) {
|
|
|
|
+ List<StudentObjectiveAnswerDto> objectiveAnswerDtos = markArchiveStudentService.listStudentObjectiveAnswerDtoByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
|
+ qs = objectiveAnswerDtos.stream().map(m -> {
|
|
|
|
+ MarkQuestion markQuestion = new MarkQuestion();
|
|
|
|
+ markQuestion.setMainNumber(m.getMainNumber());
|
|
|
|
+ markQuestion.setSubNumber(m.getSubNumber());
|
|
|
|
+ markQuestion.setTotalScore(m.getTotalScore());
|
|
|
|
+ markQuestion.setMainTitle(StringUtils.isBlank(m.getTitle()) ? m.getQuestionType() == 1 ? "单选题" : m.getQuestionType() == 2 ? "多选题" : m.getQuestionType() == 3 ? "判断题" : "" : "");
|
|
|
|
+ return markQuestion;
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
+ qs.sort(Comparator.comparing(MarkQuestion::getMainNumber).thenComparing(MarkQuestion::getSubNumber));
|
|
|
|
+ } else {
|
|
|
|
+ qs = markQuestionService.listByExamIdAndPaperNumberAndObjective(examId, paperNumber, true);
|
|
|
|
+ }
|
|
|
|
+
|
|
Map<String, List<ArchiveStudentVo>> collect = studentList.stream().filter(m -> StringUtils.isNotBlank(m.getPaperType())).collect(Collectors.groupingBy(ArchiveStudentVo::getPaperType));
|
|
Map<String, List<ArchiveStudentVo>> collect = studentList.stream().filter(m -> StringUtils.isNotBlank(m.getPaperType())).collect(Collectors.groupingBy(ArchiveStudentVo::getPaperType));
|
|
|
|
|
|
List<QuestionObjectiveVo> questionObjectiveVoList = new ArrayList<>();
|
|
List<QuestionObjectiveVo> questionObjectiveVoList = new ArrayList<>();
|