|
@@ -2085,7 +2085,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
@Override
|
|
|
public PageInfo endFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo) {
|
|
|
PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
+ Map<String, Object> params = new HashMap<>(16);
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
if(StringUtils.isNotBlank(queryInfo.getSearch())){
|
|
@@ -2093,6 +2093,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(!CollectionUtils.isEmpty(groups)){
|
|
|
params.put("groups", groups);
|
|
|
}
|
|
|
+ List<Integer> studentCourseIds=courseScheduleDao.findCourseIdsByStudent(queryInfo.getSearch());
|
|
|
+ List<Integer> teacherCourseIds=courseScheduleDao.findCourseIdsByTeacher(queryInfo.getSearch());
|
|
|
+ studentCourseIds.addAll(teacherCourseIds);
|
|
|
+ if(!CollectionUtils.isEmpty(studentCourseIds)){
|
|
|
+ params.put("courseIds", studentCourseIds);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
List<CourseScheduleEndDto> results = new ArrayList<>();
|
|
@@ -2110,10 +2116,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
groups = groupDao.findByGroupIds(groups);
|
|
|
Map<String, Map<GroupType, List<Group>>> groupsGroupByGroup = groups.stream().collect(Collectors.groupingBy(Group::getId, Collectors.groupingBy(Group::getGroupType)));
|
|
|
results.forEach(result -> {
|
|
|
- List<Group> groupTemps = groupsGroupByGroup.get(result.getMusicGroupId())
|
|
|
- .get(result.getGroupType());
|
|
|
- if(!CollectionUtils.isEmpty(groupTemps)){
|
|
|
- result.setGroupName(groupTemps.get(0).getGroupName());
|
|
|
+ Map<GroupType, List<Group>> groupsTypeMap = groupsGroupByGroup.get(result.getMusicGroupId());
|
|
|
+ if(Objects.nonNull(groupsTypeMap)){
|
|
|
+ List<Group> groupTemps = groupsTypeMap.get(result.getGroupType());
|
|
|
+ if(!CollectionUtils.isEmpty(groupTemps)){
|
|
|
+ result.setGroupName(groupTemps.get(0).getGroupName());
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|