|
@@ -15,7 +15,10 @@ import com.qmth.distributed.print.business.bean.result.ExaminationDetailResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.ExaminationResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.SummarizedDataResult;
|
|
|
import com.qmth.distributed.print.business.entity.*;
|
|
|
-import com.qmth.distributed.print.business.enums.*;
|
|
|
+import com.qmth.distributed.print.business.enums.ExamDataSourceEnum;
|
|
|
+import com.qmth.distributed.print.business.enums.ExamDetailStatusEnum;
|
|
|
+import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
|
|
|
+import com.qmth.distributed.print.business.enums.StudentClazzEnum;
|
|
|
import com.qmth.distributed.print.business.mapper.ExamDetailMapper;
|
|
|
import com.qmth.distributed.print.business.service.*;
|
|
|
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
|
|
@@ -103,9 +106,6 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
@Resource
|
|
|
TeachcloudCommonService teachcloudCommonService;
|
|
|
|
|
|
- @Resource
|
|
|
- BasicCampusService basicCampusService;
|
|
|
-
|
|
|
@Resource
|
|
|
ExamTaskService examTaskService;
|
|
|
|
|
@@ -121,6 +121,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
@Resource
|
|
|
BasicRoleDataPermissionService basicRoleDataPermissionService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private PrintCommonService printCommonService;
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public double calculateTotalSubjects(Long printPlanId) {
|
|
@@ -348,7 +351,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
return summarizedDataResult;*/
|
|
|
|
|
|
SummarizedDataResult summarizedDataResult = this.baseMapper.findSummarizedData(schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
|
|
|
- if(summarizedDataResult ==null){
|
|
|
+ if (summarizedDataResult == null) {
|
|
|
summarizedDataResult = new SummarizedDataResult();
|
|
|
summarizedDataResult.setSchoolId(schoolId);
|
|
|
summarizedDataResult.setTotalSubjects(0);
|
|
@@ -653,12 +656,12 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
public void disposeExamStudentByExaminationExcel(Long examId, List<ExaminationImportDto> dataList, Long userId, SysUser sysUser) throws IllegalAccessException {
|
|
|
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<BasicStudentExtrasParam> basicStudentExtrasParamList = new ArrayList<>();
|
|
|
Map<String, Integer> ticketNumberCodeMap = new HashMap<>();
|
|
|
- Set<String> ticketNumberRepeatList = new HashSet<>();
|
|
|
+// Set<String> ticketNumberRepeatList = new HashSet<>();
|
|
|
StringJoiner stringJoiner = new StringJoiner(",");
|
|
|
for (ExaminationImportDto examinationImportDto : dataList) {
|
|
|
Long schoolId = examinationImportDto.getSchoolId();
|
|
@@ -672,7 +675,12 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
String paperNumber = examinationImportDto.getPaperNumber();
|
|
|
String studentName = examinationImportDto.getStudentName();
|
|
|
String studentCode = examinationImportDto.getStudentCode();
|
|
|
- String ticketNumber = examinationImportDto.getTicketNumber();
|
|
|
+ String ticketNumber = null;
|
|
|
+ if (Objects.isNull(examinationImportDto.getTicketNumber()) || Objects.equals(examinationImportDto.getTicketNumber().trim(), "")) {//如果为空
|
|
|
+ ticketNumber = printCommonService.createTicketNumber(schoolId);
|
|
|
+ } else {
|
|
|
+ ticketNumber = examinationImportDto.getTicketNumber();
|
|
|
+ }
|
|
|
String siteNumber = examinationImportDto.getSiteNumber();
|
|
|
String collegeName = examinationImportDto.getCollegeName();
|
|
|
String majorName = examinationImportDto.getMajorName();
|
|
@@ -684,9 +692,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
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<ExtendFieldsDto> extendFieldsDtoList = this.getExtendFieldsByFields(fieldsDtoList);
|
|
@@ -745,9 +753,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
|
if (!stringList.isEmpty()) {
|
|
|
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) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
|
|
|
}
|