|
@@ -386,8 +386,13 @@ public class ThemeLogicImpl implements ThemeLogic {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<ThemeInfoVO> getThemeInfoByThemeId(Long themeId) {
|
|
|
|
- List<ThemeInfoVO> themeInfoVOList = new ArrayList<>();
|
|
|
|
|
|
+ public ThemeInfoVO getThemeInfoByThemeId(Long themeId) {
|
|
|
|
+ ThemeInfoVO themeInfoVO = new ThemeInfoVO();
|
|
|
|
+ ThemeDetail themeDetail = themeService.getThemeDetailById(themeId);
|
|
|
|
+ ThemeDetailVO themeDetailVO = themeVOWrapper.wrapperThemeDetail(themeDetail);
|
|
|
|
+ themeInfoVO.setThemeDetailVO(themeDetailVO);
|
|
|
|
+ themeInfoVO.setStudentNum(examVOWrapper.wrapExamFrom(examService.getTask(themeDetailVO.getGroupId())).getParticipantCount());
|
|
|
|
+ List<ExamResultVO> examResultVOS = new ArrayList<>();
|
|
List<ThemeEntityRelations> themeEntityRelations = themeService.getThemeEntityRelations(themeId).stream()
|
|
List<ThemeEntityRelations> themeEntityRelations = themeService.getThemeEntityRelations(themeId).stream()
|
|
.filter(entityRelation -> entityRelation.getEntityType() == EntityTypeEnum.EXAM).collect(Collectors.toList());
|
|
.filter(entityRelation -> entityRelation.getEntityType() == EntityTypeEnum.EXAM).collect(Collectors.toList());
|
|
for(ThemeEntityRelations relation : themeEntityRelations){
|
|
for(ThemeEntityRelations relation : themeEntityRelations){
|
|
@@ -397,8 +402,9 @@ public class ThemeLogicImpl implements ThemeLogic {
|
|
throw new HttpNotFoundException("exam doesn't exists");
|
|
throw new HttpNotFoundException("exam doesn't exists");
|
|
}
|
|
}
|
|
ExamVO examVO = examVOWrapper.wrapExamFrom(exam);
|
|
ExamVO examVO = examVOWrapper.wrapExamFrom(exam);
|
|
- themeInfoVOList.add(new ThemeInfoVO(examVO, scoreList));
|
|
|
|
|
|
+ examResultVOS.add(new ExamResultVO(examVO, scoreList));
|
|
}
|
|
}
|
|
- return themeInfoVOList;
|
|
|
|
|
|
+ themeInfoVO.setExamResultVOList(examResultVOS);
|
|
|
|
+ return themeInfoVO;
|
|
}
|
|
}
|
|
}
|
|
}
|