|
@@ -3,14 +3,7 @@ package com.ym.mec.biz.service.impl;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Set;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -1136,6 +1129,15 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
List<HighClassGroupDto> highClassGroup = classGroupDao.findHighClassGroup(musicGroupId, classGroupIds);
|
|
|
Set<ClassGroupTypeEnum> classGroupTypeSet = highClassGroup.stream().map(HighClassGroupDto::getType).collect(Collectors.toSet());
|
|
|
+ String HighClassGroupSubjectIds = highClassGroup.stream().filter(e -> e.getType().equals(ClassGroupTypeEnum.HIGH)).map(HighClassGroupDto::getSubjectIdList).collect(Collectors.joining(","));
|
|
|
+ String HighOnlineClassGroupSubjectIds = highClassGroup.stream().filter(e -> e.getType().equals(ClassGroupTypeEnum.HIGH_ONLINE)).map(HighClassGroupDto::getSubjectIdList).collect(Collectors.joining(","));
|
|
|
+ if (!HighClassGroupSubjectIds.isEmpty() && !HighOnlineClassGroupSubjectIds.isEmpty()) {
|
|
|
+ HighClassGroupSubjectIds += "," + HighOnlineClassGroupSubjectIds;
|
|
|
+ } else {
|
|
|
+ HighClassGroupSubjectIds += HighOnlineClassGroupSubjectIds;
|
|
|
+ }
|
|
|
+
|
|
|
+ String[] subjectIds = HighClassGroupSubjectIds.split(",");
|
|
|
|
|
|
List<StudentRegistration> students = new ArrayList<>();
|
|
|
if (classGroupTypeSet.contains(ClassGroupTypeEnum.HIGH)) {
|
|
@@ -1146,14 +1148,20 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<StudentRegistration> noHighOnlineClassGroupStudents = studentRegistrationService.findMusicGroupStuNoClassType(musicGroupId, ClassGroupTypeEnum.HIGH_ONLINE, null);
|
|
|
students.addAll(noHighOnlineClassGroupStudents);
|
|
|
}
|
|
|
- if (students.size() == 0) {
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
Map<Integer, String> studentMap = new HashMap<>();
|
|
|
for (StudentRegistration student : students) {
|
|
|
+ if(!Arrays.asList(subjectIds).contains(student.getActualSubjectId().toString())){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
studentMap.put(student.getUserId(), student.getUserId().toString());
|
|
|
}
|
|
|
|
|
|
+ if (studentMap.size() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
String baseURL = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
String url = baseURL + "/#/smallRegister?musicGroupId=" + musicGroupId;
|
|
|
String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|