|
@@ -656,12 +656,12 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
public void disposeExamStudentByExaminationExcel(Long examId, List<ExaminationImportDto> dataList, Long userId, SysUser sysUser) throws IllegalAccessException {
|
|
public void disposeExamStudentByExaminationExcel(Long examId, List<ExaminationImportDto> dataList, Long userId, SysUser sysUser) throws IllegalAccessException {
|
|
BasicExam basicExam = basicExamService.getById(examId);
|
|
BasicExam basicExam = basicExamService.getById(examId);
|
|
// 查询学期下所有考务数据的准考证号集合
|
|
// 查询学期下所有考务数据的准考证号集合
|
|
-// List<String> examStudentTicketNumberList = examStudentService.listTicketNumberBySemesterId(basicExam.getSemesterId(), examId);
|
|
|
|
|
|
+ List<String> examStudentTicketNumberList = examStudentService.listTicketNumberBySemesterId(basicExam.getSemesterId(), examId);
|
|
|
|
|
|
List<ExamStudent> examStudentList = new ArrayList<>();
|
|
List<ExamStudent> examStudentList = new ArrayList<>();
|
|
List<BasicStudentExtrasParam> basicStudentExtrasParamList = new ArrayList<>();
|
|
List<BasicStudentExtrasParam> basicStudentExtrasParamList = new ArrayList<>();
|
|
Map<String, Integer> ticketNumberCodeMap = new HashMap<>();
|
|
Map<String, Integer> ticketNumberCodeMap = new HashMap<>();
|
|
-// Set<String> ticketNumberRepeatList = new HashSet<>();
|
|
|
|
|
|
+ Set<String> ticketNumberRepeatList = new HashSet<>();
|
|
StringJoiner stringJoiner = new StringJoiner(",");
|
|
StringJoiner stringJoiner = new StringJoiner(",");
|
|
for (ExaminationImportDto examinationImportDto : dataList) {
|
|
for (ExaminationImportDto examinationImportDto : dataList) {
|
|
Long schoolId = examinationImportDto.getSchoolId();
|
|
Long schoolId = examinationImportDto.getSchoolId();
|
|
@@ -692,9 +692,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
ticketNumberCodeMap.put(ticketNumber, 1);
|
|
ticketNumberCodeMap.put(ticketNumber, 1);
|
|
}
|
|
}
|
|
|
|
|
|
-// if (!examStudentTicketNumberList.isEmpty() && examStudentTicketNumberList.contains(ticketNumber)) {
|
|
|
|
-// ticketNumberRepeatList.add(ticketNumber);
|
|
|
|
-// }
|
|
|
|
|
|
+ if (!examStudentTicketNumberList.isEmpty() && examStudentTicketNumberList.contains(ticketNumber)) {
|
|
|
|
+ ticketNumberRepeatList.add(ticketNumber);
|
|
|
|
+ }
|
|
|
|
|
|
List<FieldsDto> fieldsDtoList = examinationImportDto.getSecondaryFieldList();
|
|
List<FieldsDto> fieldsDtoList = examinationImportDto.getSecondaryFieldList();
|
|
List<ExtendFieldsDto> extendFieldsDtoList = this.getExtendFieldsByFields(fieldsDtoList);
|
|
List<ExtendFieldsDto> extendFieldsDtoList = this.getExtendFieldsByFields(fieldsDtoList);
|
|
@@ -753,9 +753,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
if (!stringList.isEmpty()) {
|
|
if (!stringList.isEmpty()) {
|
|
stringJoiner.add(String.join(",", stringList));
|
|
stringJoiner.add(String.join(",", stringList));
|
|
}
|
|
}
|
|
-// if (!ticketNumberRepeatList.isEmpty()) {
|
|
|
|
-// stringJoiner.add("考号[" + String.join(",", ticketNumberRepeatList) + "]在当前考试下已存在");
|
|
|
|
-// }
|
|
|
|
|
|
+ if (!ticketNumberRepeatList.isEmpty()) {
|
|
|
|
+ stringJoiner.add("考号[" + String.join(",", ticketNumberRepeatList) + "]在当前考试下已存在");
|
|
|
|
+ }
|
|
if (stringJoiner.toString().length() > 1) {
|
|
if (stringJoiner.toString().length() > 1) {
|
|
throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
|
|
throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
|
|
}
|
|
}
|
|
@@ -769,8 +769,6 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
.eq(BasicClazz::getSchoolId, examStudent.getSchoolId())).getId()));
|
|
.eq(BasicClazz::getSchoolId, examStudent.getSchoolId())).getId()));
|
|
}
|
|
}
|
|
examStudentService.saveBatch(examStudentList);
|
|
examStudentService.saveBatch(examStudentList);
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|