|
@@ -112,7 +112,7 @@ public class StudentLessonExaminationServiceImpl extends ServiceImpl<StudentLess
|
|
|
eq(StudentLessonExaminationDetail::getLessonExaminationId, queryInfo.getLessonExaminationId()).list();
|
|
|
String musicScoreIds = list.stream().map(e->e.getMusicScoreId().toString()).collect(Collectors.joining(","));
|
|
|
Map<Integer, SysMusicScore> musicScoreMap = new HashMap<>();
|
|
|
- if (StringUtils.isEmpty(musicScoreIds)) {
|
|
|
+ if (StringUtils.isNotEmpty(musicScoreIds)) {
|
|
|
List<SysMusicScore> musicScores = sysMusicScoreDao.findByIds(musicScoreIds);
|
|
|
if (CollectionUtils.isNotEmpty(musicScores)) {
|
|
|
musicScoreMap = musicScores.stream().collect(Collectors.toMap(SysMusicScore::getId, e -> e));
|
|
@@ -126,7 +126,9 @@ public class StudentLessonExaminationServiceImpl extends ServiceImpl<StudentLess
|
|
|
StudentLessonExaminationDetailDto detailDto = JSON.parseObject(JSON.toJSONString(detail), StudentLessonExaminationDetailDto.class);
|
|
|
if(detail.getMusicScoreId() != null){
|
|
|
SysMusicScore musicScore = musicScoreMap.get(detail.getMusicScoreId().intValue());
|
|
|
- detailDto.setMusicScoreName(musicScore.getName());
|
|
|
+ if (musicScore != null){
|
|
|
+ detailDto.setMusicScoreName(musicScore.getName());
|
|
|
+ }
|
|
|
}
|
|
|
dto.setStudentLessonExaminationDetail(detailDto);
|
|
|
}
|