|
@@ -281,13 +281,14 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
if(CollectionUtils.isEmpty(examRooms)){
|
|
|
throw new BizException("请先建立考场");
|
|
|
}
|
|
|
- Map<String, List<ExamRoom>> subjectExamRoomMap = examRooms.stream().collect(Collectors.groupingBy(ExamRoom::getSubjectIdList));
|
|
|
+// Map<String, List<ExamRoom>> subjectExamRoomMap = examRooms.stream().collect(Collectors.groupingBy(ExamRoom::getSubjectIdList));
|
|
|
|
|
|
List<ExamRoomStudentRelation> newRoomStudents = new ArrayList<>();
|
|
|
|
|
|
for (Map.Entry<Integer, List<ExamRegistration>> subjectRegistEntry : subjectRegistMap.entrySet()) {
|
|
|
List<ExamRegistration> subjectRegists = subjectRegistEntry.getValue();
|
|
|
- List<ExamRoom> subjectRooms = subjectExamRoomMap.get(subjectRegistEntry.getKey().toString());
|
|
|
+// List<ExamRoom> subjectRooms = subjectExamRoomMap.get(subjectRegistEntry.getKey().toString());
|
|
|
+ List<ExamRoom> subjectRooms = examRooms.stream().filter(e-> Arrays.stream(e.getSubjectIdList().split(",")).collect(Collectors.toSet()).contains(subjectRegistEntry.getKey().toString()))
|
|
|
if(CollectionUtils.isEmpty(subjectRooms)){
|
|
|
continue;
|
|
|
}
|