|
@@ -974,28 +974,33 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
@Override
|
|
|
public List<Date> getCourseScheduleDates(Date month, String organIdList, String 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;
|
|
|
+// 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);
|
|
|
+ List<Integer> organIds = new ArrayList<>();
|
|
|
+ if(StringUtils.isNotBlank(organIdList)){
|
|
|
+ organIds = Arrays.stream(organIdList.split(",")).map(s->Integer.valueOf(s)).collect(Collectors.toList());
|
|
|
}
|
|
|
- return courseScheduleDao.getCourseScheduleDate(month, classGroupIds,type);
|
|
|
+ return courseScheduleDao.getCourseScheduleDateWithOrgan(organIds, month, type);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1077,30 +1082,35 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
queryInfo.setDate(new Date());
|
|
|
}
|
|
|
|
|
|
+ List<Integer> organIds = new ArrayList<>();
|
|
|
+ if(StringUtils.isNotBlank(queryInfo.getOrganIdList())){
|
|
|
+ organIds = Arrays.stream(queryInfo.getOrganIdList().split(",")).map(s->Integer.valueOf(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
- params.put("musicGroupStatus", null);
|
|
|
- params.put("vipGroupStatus", null);
|
|
|
- List<Group> groups = groupDao.searchGroups(params);
|
|
|
- if(!CollectionUtils.isEmpty(groups)){
|
|
|
- Map<GroupType, List<Group>> groupTypeGroupsMap = groups.stream().collect(Collectors.groupingBy(Group::getGroupType));
|
|
|
- List<Integer> classGroupIds=new ArrayList<>();
|
|
|
- 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 pageInfo;
|
|
|
- }
|
|
|
- params.put("classGroupIds", classGroupIds);
|
|
|
- }else{
|
|
|
- return pageInfo;
|
|
|
- }
|
|
|
+// params.put("musicGroupStatus", null);
|
|
|
+// params.put("vipGroupStatus", null);
|
|
|
+// List<Group> groups = groupDao.searchGroups(params);
|
|
|
+// if(!CollectionUtils.isEmpty(groups)){
|
|
|
+// Map<GroupType, List<Group>> groupTypeGroupsMap = groups.stream().collect(Collectors.groupingBy(Group::getGroupType));
|
|
|
+// List<Integer> classGroupIds=new ArrayList<>();
|
|
|
+// 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 pageInfo;
|
|
|
+// }
|
|
|
+// params.put("classGroupIds", classGroupIds);
|
|
|
+// }else{
|
|
|
+// return pageInfo;
|
|
|
+// }
|
|
|
|
|
|
List<CourseScheduleDto> dataList = null;
|
|
|
int count = courseScheduleDao.countCourseSchedulesWithDate(params);
|