|
@@ -779,7 +779,28 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
@Override
|
|
|
public List<Date> getCourseScheduleDates(Date month, String organIdList, String type) {
|
|
|
- return courseScheduleDao.getCourseScheduleDate(month, organIdList,type);
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ params.put("organIdList", organIdList);
|
|
|
+
|
|
|
+ List<Group> groups = groupDao.searchGroups(params);
|
|
|
+ List<Integer> classGroupIds=new ArrayList<>();
|
|
|
+ if(!CollectionUtils.isEmpty(groups)){
|
|
|
+ Map<GroupType, List<Group>> groupTypeGroupsMap = groups.stream().collect(Collectors.groupingBy(Group::getGroupType));
|
|
|
+ for (Map.Entry<GroupType, List<Group>> groupTypeListEntry : groupTypeGroupsMap.entrySet()) {
|
|
|
+ List<String> groupIds = groupTypeListEntry.getValue().stream().map(Group::getId).collect(Collectors.toList());
|
|
|
+ List<ClassGroup> classGroups = classGroupDao.findByMusicGroupsAndType(groupIds, groupTypeListEntry.getKey().getCode());
|
|
|
+ if(!CollectionUtils.isEmpty(classGroups)){
|
|
|
+ List<Integer> tempClassGroupIds=classGroups.stream().map(ClassGroup::getId).collect(Collectors.toList());
|
|
|
+ classGroupIds.addAll(tempClassGroupIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(CollectionUtils.isEmpty(classGroupIds)){
|
|
|
+ return Collections.EMPTY_LIST;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return Collections.EMPTY_LIST;
|
|
|
+ }
|
|
|
+ return courseScheduleDao.getCourseScheduleDate(month, classGroupIds,type);
|
|
|
}
|
|
|
|
|
|
@Override
|