Forráskód Böngészése

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 éve
szülő
commit
7882befd08

+ 5 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRoomStudentRelationServiceImpl.java

@@ -113,6 +113,11 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 		List<ExamRegistration> examRegistrations = examRegistrationDao.getRegists(Arrays.asList(registIds).stream().map(e -> Long.valueOf(e)).collect(Collectors.toList()));
 		Map<Integer, ExamRegistration> studentRegistMap = examRegistrations.stream().collect(Collectors.toMap(ExamRegistration::getId, e -> e));
 
+		Set<Integer> studentIds = examRegistrations.stream().map(ExamRegistration::getStudentId).collect(Collectors.toSet());
+		if(studentIds.size()!=registIds.length){
+			throw new BizException("学员重复");
+		}
+
 		List<ExamRoomStudentRelation> examRoomStudentRelations=new ArrayList<>();
 		List<StudentExamResult> studentExamResults=new ArrayList<>();
 		List<ExamCertification> examCertifications=new ArrayList<>();