|
@@ -327,6 +327,21 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
.lambda()
|
|
.lambda()
|
|
.eq(ExamStudentEntity::getExamId, examEntity.getId()));
|
|
.eq(ExamStudentEntity::getExamId, examEntity.getId()));
|
|
|
|
|
|
|
|
+ //
|
|
|
|
+ List<String> checkExamNumber = dbStudentList
|
|
|
|
+ .stream()
|
|
|
|
+ .map(ExamStudentEntity::getExamNumber)
|
|
|
|
+ .distinct()
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<String> examNumberList = studentList.stream().map(ExamStudentEntity::getExamNumber).collect(Collectors.toList());
|
|
|
|
+ for (String examNumber : examNumberList) {
|
|
|
|
+ if (checkExamNumber.contains(examNumber)) {
|
|
|
|
+ throw new StatusException(String.format("导入失败,已存在准考证号为[%s]的考生", examNumber));
|
|
|
|
+ } else {
|
|
|
|
+ checkExamNumber.add(examNumber);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
Map<String, List<ExamStudentEntity>> groupCollection = null;
|
|
Map<String, List<ExamStudentEntity>> groupCollection = null;
|
|
switch (groupType) {
|
|
switch (groupType) {
|
|
case COURSE:
|
|
case COURSE:
|