|
@@ -330,6 +330,9 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
Map<String, List<ExamStudentEntity>> groupCollection = null;
|
|
Map<String, List<ExamStudentEntity>> groupCollection = null;
|
|
switch (groupType) {
|
|
switch (groupType) {
|
|
case COURSE:
|
|
case COURSE:
|
|
|
|
+ if (studentList.stream().anyMatch(e -> e.getCourseCode() == null || e.getCourseCode().length() == 0)){
|
|
|
|
+ throw new StatusException(String.format("不能导入分组字段[%s]为空的考生文件",groupType.getName()));
|
|
|
|
+ }
|
|
// 导入的新考生数据不能包含有之前科目的
|
|
// 导入的新考生数据不能包含有之前科目的
|
|
List<String> dbCourseList = dbStudentList
|
|
List<String> dbCourseList = dbStudentList
|
|
.stream()
|
|
.stream()
|
|
@@ -343,6 +346,9 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
groupCollection = studentList.stream().collect(Collectors.groupingBy(ExamStudentEntity::getCourseCode));
|
|
groupCollection = studentList.stream().collect(Collectors.groupingBy(ExamStudentEntity::getCourseCode));
|
|
break;
|
|
break;
|
|
case EXAM_SITE:
|
|
case EXAM_SITE:
|
|
|
|
+ if (studentList.stream().anyMatch(e -> e.getExamSite() == null || e.getExamSite().length() == 0)){
|
|
|
|
+ throw new StatusException(String.format("不能导入分组字段[%s]为空的考生文件",groupType.getName()));
|
|
|
|
+ }
|
|
// 导入的新考生数据不能包含有之前考点
|
|
// 导入的新考生数据不能包含有之前考点
|
|
List<String> dbExamSiteList = dbStudentList
|
|
List<String> dbExamSiteList = dbStudentList
|
|
.stream()
|
|
.stream()
|
|
@@ -356,7 +362,10 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
groupCollection = studentList.stream().collect(Collectors.groupingBy(ExamStudentEntity::getExamSite));
|
|
groupCollection = studentList.stream().collect(Collectors.groupingBy(ExamStudentEntity::getExamSite));
|
|
break;
|
|
break;
|
|
case EXAM_ROOM:
|
|
case EXAM_ROOM:
|
|
- // 导入的新考生数据不能包含有之前烤成
|
|
|
|
|
|
+ if (studentList.stream().anyMatch(e -> e.getExamRoom() == null || e.getExamRoom().length() == 0)){
|
|
|
|
+ throw new StatusException(String.format("不能导入分组字段[%s]为空的考生文件",groupType.getName()));
|
|
|
|
+ }
|
|
|
|
+ // 导入的新考生数据不能包含有之前考生
|
|
List<String> dbExamRoomList = dbStudentList
|
|
List<String> dbExamRoomList = dbStudentList
|
|
.stream()
|
|
.stream()
|
|
.filter(e -> e.getExamRoom() != null && e.getExamRoom().length() > 0)
|
|
.filter(e -> e.getExamRoom() != null && e.getExamRoom().length() > 0)
|