|
@@ -14,6 +14,8 @@ import com.qmth.distributed.print.business.bean.dto.*;
|
|
import com.qmth.distributed.print.business.bean.dto.approvalForm.*;
|
|
import com.qmth.distributed.print.business.bean.dto.approvalForm.*;
|
|
import com.qmth.distributed.print.business.bean.dto.examObject.ExamObjectDto;
|
|
import com.qmth.distributed.print.business.bean.dto.examObject.ExamObjectDto;
|
|
import com.qmth.distributed.print.business.bean.dto.excel.ExamStudentImportDto;
|
|
import com.qmth.distributed.print.business.bean.dto.excel.ExamStudentImportDto;
|
|
|
|
+import com.qmth.distributed.print.business.bean.examRule.CodeNameEnableValue;
|
|
|
|
+import com.qmth.distributed.print.business.bean.examRule.FieldsDto;
|
|
import com.qmth.distributed.print.business.bean.params.*;
|
|
import com.qmth.distributed.print.business.bean.params.*;
|
|
import com.qmth.distributed.print.business.bean.result.WorkResult;
|
|
import com.qmth.distributed.print.business.bean.result.WorkResult;
|
|
import com.qmth.distributed.print.business.bean.result.examTaskStudent.ExamTaskExamStudentImportResult;
|
|
import com.qmth.distributed.print.business.bean.result.examTaskStudent.ExamTaskExamStudentImportResult;
|
|
@@ -48,6 +50,7 @@ import com.qmth.teachcloud.common.util.excel.ExcelError;
|
|
import org.activiti.engine.ActivitiObjectNotFoundException;
|
|
import org.activiti.engine.ActivitiObjectNotFoundException;
|
|
import org.activiti.engine.TaskService;
|
|
import org.activiti.engine.TaskService;
|
|
import org.activiti.engine.task.Task;
|
|
import org.activiti.engine.task.Task;
|
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.io.FileUtils;
|
|
import org.apache.commons.io.FileUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -55,7 +58,6 @@ import org.slf4j.LoggerFactory;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
@@ -68,6 +70,7 @@ import java.io.InputStream;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.concurrent.atomic.AtomicInteger;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
@@ -84,6 +87,10 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(ExamTaskServiceImpl.class);
|
|
private static final Logger logger = LoggerFactory.getLogger(ExamTaskServiceImpl.class);
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private BasicTeachClazzService basicTeachClazzService;
|
|
|
|
+ @Resource
|
|
|
|
+ private BasicExamStudentService basicExamStudentService;
|
|
@Resource
|
|
@Resource
|
|
private ExamTaskTempService examTaskTempService;
|
|
private ExamTaskTempService examTaskTempService;
|
|
@Resource
|
|
@Resource
|
|
@@ -96,8 +103,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
@Lazy
|
|
@Lazy
|
|
private PrintCommonService printCommonService;
|
|
private PrintCommonService printCommonService;
|
|
@Resource
|
|
@Resource
|
|
- ExamTaskMapper examTaskMapper;
|
|
|
|
- @Resource
|
|
|
|
private BasicCourseService basicCourseService;
|
|
private BasicCourseService basicCourseService;
|
|
@Resource
|
|
@Resource
|
|
private SysUserService sysUserService;
|
|
private SysUserService sysUserService;
|
|
@@ -428,7 +433,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
} else {
|
|
} else {
|
|
List<SysUserResult> courseUserList = Objects.nonNull(assignTeacherDto) ? assignTeacherDto.getCourseUserList() : new ArrayList<>();
|
|
List<SysUserResult> courseUserList = Objects.nonNull(assignTeacherDto) ? assignTeacherDto.getCourseUserList() : new ArrayList<>();
|
|
Map<String, String> courseUserMap = courseUserList.stream().collect(Collectors.toMap(SysUserResult::getLoginName, SysUserResult::getRealName));
|
|
Map<String, String> courseUserMap = courseUserList.stream().collect(Collectors.toMap(SysUserResult::getLoginName, SysUserResult::getRealName));
|
|
- if (!CollectionUtils.isEmpty(courseUserMap)) {
|
|
|
|
|
|
+ if (!courseUserMap.isEmpty()) {
|
|
userMap.putAll(courseUserMap);
|
|
userMap.putAll(courseUserMap);
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(excelTeacherAccount)) {
|
|
if (StringUtils.isNotBlank(excelTeacherAccount)) {
|
|
@@ -789,8 +794,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
.eq(ExamTask::getId, examTask.getId());
|
|
.eq(ExamTask::getId, examTask.getId());
|
|
this.update(updateWrapper);
|
|
this.update(updateWrapper);
|
|
|
|
|
|
-// ExamTaskDetail detail = examTaskDetailService.getByExamTaskId(examTaskDetail.getExamTaskId());
|
|
|
|
- ExamTaskDetail detail = null;
|
|
|
|
|
|
+ ExamTaskDetail detail = examTaskDetailService.getByExamTaskIdNotValid(examTaskDetail.getExamTaskId());
|
|
if (detail != null) {
|
|
if (detail != null) {
|
|
examTaskDetail.setId(detail.getId());
|
|
examTaskDetail.setId(detail.getId());
|
|
// 已曝光试卷和未曝光试卷赋值
|
|
// 已曝光试卷和未曝光试卷赋值
|
|
@@ -1066,7 +1070,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public IPage<WorkResult> getFlowTaskReadyList(IPage<Map> iPage, Long schoolId, Long orgId, Long userId) {
|
|
public IPage<WorkResult> getFlowTaskReadyList(IPage<Map> iPage, Long schoolId, Long orgId, Long userId) {
|
|
- return examTaskMapper.getFlowTaskReadyList(iPage, schoolId, orgId, String.valueOf(userId));
|
|
|
|
|
|
+ return this.baseMapper.getFlowTaskReadyList(iPage, schoolId, orgId, String.valueOf(userId));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1078,7 +1082,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public WorkResult getFlowInfo(Long flowId, Long taskId) {
|
|
public WorkResult getFlowInfo(Long flowId, Long taskId) {
|
|
- return examTaskMapper.getFlowInfo(flowId, taskId);
|
|
|
|
|
|
+ return this.baseMapper.getFlowInfo(flowId, taskId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1092,7 +1096,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public ExamTask findExamTaskByFlowStatus(Long schoolId, Long examId, String courseCode, String paperNumber, FlowStatusEnum flowStatus) {
|
|
public ExamTask findExamTaskByFlowStatus(Long schoolId, Long examId, String courseCode, String paperNumber, FlowStatusEnum flowStatus) {
|
|
- List<ExamTask> examTaskList = examTaskMapper.findExamTaskByFlowStatus(schoolId, examId, courseCode, paperNumber, Objects.nonNull(flowStatus) ? flowStatus.name() : null);
|
|
|
|
|
|
+ List<ExamTask> examTaskList = this.baseMapper.findExamTaskByFlowStatus(schoolId, examId, courseCode, paperNumber, Objects.nonNull(flowStatus) ? flowStatus.name() : null);
|
|
if (CollectionUtils.isEmpty(examTaskList)) {
|
|
if (CollectionUtils.isEmpty(examTaskList)) {
|
|
throw ExceptionResultEnum.EXAM_TASK_IS_NULL.exception();
|
|
throw ExceptionResultEnum.EXAM_TASK_IS_NULL.exception();
|
|
} else if (examTaskList.size() != 1) {
|
|
} else if (examTaskList.size() != 1) {
|
|
@@ -1123,6 +1127,9 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
if (StringUtils.isNotBlank(paperAttachmentIds)) {
|
|
if (StringUtils.isNotBlank(paperAttachmentIds)) {
|
|
List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(paperAttachmentIds);
|
|
List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(paperAttachmentIds);
|
|
for (PaperInfoVo paperInfoVo : paperInfoVoList) {
|
|
for (PaperInfoVo paperInfoVo : paperInfoVoList) {
|
|
|
|
+ if(StringUtils.isBlank(paperInfoVo.getCardId())){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Long cardId = Long.valueOf(paperInfoVo.getCardId());
|
|
Long cardId = Long.valueOf(paperInfoVo.getCardId());
|
|
ExamCard examCard = examCardService.getById(cardId);
|
|
ExamCard examCard = examCardService.getById(cardId);
|
|
if (examCard.getType().equals(CardTypeEnum.CUSTOM) || (examCard.getType().equals(CardTypeEnum.GENERIC) && examCard.getCreateMethod().equals(CardCreateMethodEnum.STANDARD))) {
|
|
if (examCard.getType().equals(CardTypeEnum.CUSTOM) || (examCard.getType().equals(CardTypeEnum.GENERIC) && examCard.getCreateMethod().equals(CardCreateMethodEnum.STANDARD))) {
|
|
@@ -1395,7 +1402,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
|
|
|
// 更新实际考生数量
|
|
// 更新实际考生数量
|
|
List<ExamTaskStudentObjectParam> examTaskStudentObjectParamList = examDetailList.getExamTaskStudentObjectParamList();
|
|
List<ExamTaskStudentObjectParam> examTaskStudentObjectParamList = examDetailList.getExamTaskStudentObjectParamList();
|
|
- List<ExamStudent> examStudents = printCommonService.createBatchStudentByStudentList(schoolId, examPrintPlan.getExamId(), basicExam.getSemesterId(), examTask, examDetailList.getExtendFields(), examTaskStudentObjectParamList, examDetailCourse.getId(), basicPrintConfig.getCardRuleId(), sysUser);
|
|
|
|
|
|
+ List<ExamStudent> examStudents = printCommonService.createBatchStudentByStudentList(examPrintPlan.getExamId(), examTask, examDetailList.getExtendFields(), examTaskStudentObjectParamList, examDetailCourse.getId(), sysUser);
|
|
|
|
|
|
Set<String> classNameSet = new HashSet<>();
|
|
Set<String> classNameSet = new HashSet<>();
|
|
for (ExamStudent examStudent : examStudents) {
|
|
for (ExamStudent examStudent : examStudents) {
|
|
@@ -1650,7 +1657,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public ExamTask findByFlowId(Long flowId) {
|
|
public ExamTask findByFlowId(Long flowId) {
|
|
- ExamTask examTask = examTaskMapper.findByFlowId(flowId);
|
|
|
|
|
|
+ ExamTask examTask = this.baseMapper.findByFlowId(flowId);
|
|
Optional.ofNullable(examTask).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("命题计划为空"));
|
|
Optional.ofNullable(examTask).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("命题计划为空"));
|
|
return examTask;
|
|
return examTask;
|
|
}
|
|
}
|
|
@@ -1965,11 +1972,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public List<ExamTask> getExamTaskByCourseCodeAndCardId(Long schoolId, String courseCode, String cardId) {
|
|
|
|
- return this.baseMapper.getExamTaskByCourseCodeAndCardId(schoolId, courseCode, cardId);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public List<String> listPaperNumber(String param, List<Long> printPlanIdList) {
|
|
public List<String> listPaperNumber(String param, List<Long> printPlanIdList) {
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
@@ -2124,6 +2126,145 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Transactional
|
|
|
|
+ @Override
|
|
|
|
+ public List<ExamDetail> matchBasicExamStudent(BasicExam basicExam, ExamTask examTask, ExamTaskDetail examTaskDetail, SysUser sysUser) {
|
|
|
|
+ List<BasicExamStudent> basicExamStudentList = basicExamStudentService.listByExamIdAndPaperNumber(examTask.getExamId(), examTask.getPaperNumber());
|
|
|
|
+ // 创建印刷计划
|
|
|
|
+ ExamPrintPlan examPrintPlan = new ExamPrintPlan();
|
|
|
|
+ examPrintPlan.insertInfo(sysUser.getId());
|
|
|
|
+ examPrintPlan.setSchoolId(sysUser.getSchoolId());
|
|
|
|
+ examPrintPlan.setExamId(examTask.getExamId());
|
|
|
|
+ examPrintPlan.setOrgId(sysUser.getOrgId());
|
|
|
|
+ examPrintPlan.setName(examTask.getCourseName() + examTask.getPaperNumber());
|
|
|
|
+ examPrintPlan.setExamStartTime(System.currentTimeMillis());
|
|
|
|
+ examPrintPlan.setExamEndTime(System.currentTimeMillis());
|
|
|
|
+ BasicPrintConfig basicPrintConfig = basicPrintConfigService.getByExamId(basicExam.getId());
|
|
|
|
+ List<String> stringList = JSONObject.parseArray(basicPrintConfig.getPrintContent(), String.class);
|
|
|
|
+ if (!stringList.contains("PAPER")) {
|
|
|
|
+ List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds());
|
|
|
|
+ long count = paperInfoVoList.stream().filter(m -> Objects.isNull(m.getAttachmentId())).count();
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ stringList.add("PAPER");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ examPrintPlan.setPrintContent(String.join(",", stringList));
|
|
|
|
+ examPrintPlan.setBackupMethod(BackupMethodEnum.valueOf(basicPrintConfig.getBackupMethod()));
|
|
|
|
+ examPrintPlan.setBackupCount(basicPrintConfig.getBackupCount());
|
|
|
|
+ examPrintPlan.setDrawRule(basicPrintConfig.getDrawRule());
|
|
|
|
+ examPrintPlan.setVariableContent(basicPrintConfig.getVariableContent());
|
|
|
|
+ examPrintPlan.setOrdinaryContent(basicPrintConfig.getOrdinaryContent());
|
|
|
|
+ examPrintPlan.setStatus(PrintPlanStatusEnum.READY);
|
|
|
|
+ examPrintPlanService.save(examPrintPlan);
|
|
|
|
+
|
|
|
|
+ List<Map<String, Object>> examDetailKeyList = basicExamStudentList.stream().flatMap(e -> {
|
|
|
|
+ Long schoolIdId = e.getSchoolId();
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("schoolId", schoolIdId);
|
|
|
|
+ map.put("examPlace", e.getExamPlace());
|
|
|
|
+ map.put("examRoom", e.getExamRoom());
|
|
|
|
+ map.put("examStartTime", e.getExamStartTime());
|
|
|
|
+ map.put("examEndTime", e.getExamEndTime());
|
|
|
|
+ return Stream.of(map);
|
|
|
|
+ }).distinct().collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ List<ExamDetail> examDetailList = new ArrayList<>();
|
|
|
|
+ for (Map<String, Object> map : examDetailKeyList) {
|
|
|
|
+ Long schoolId = Long.valueOf(String.valueOf(map.get("schoolId")));
|
|
|
|
+ String examPlace = String.valueOf(map.get("examPlace"));
|
|
|
|
+ String examRoom = String.valueOf(map.get("examRoom"));
|
|
|
|
+ Long examStartTime = Long.valueOf(String.valueOf(map.get("examStartTime")));
|
|
|
|
+ Long examEndTime = Long.valueOf(String.valueOf(map.get("examEndTime")));
|
|
|
|
+
|
|
|
|
+ List<BasicExamStudent> examDetailStudentList = basicExamStudentList.stream().filter(e -> e.getExamPlace().equals(examPlace) &&
|
|
|
|
+ e.getExamRoom().equals(examRoom) && e.getExamStartTime().equals(examStartTime) && e.getExamEndTime().equals(examEndTime))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ ExamDetail examDetail = new ExamDetail();
|
|
|
|
+ examDetail.setId(SystemConstant.getDbUuid());
|
|
|
|
+ examDetail.setPackageCode("1" + redisCounterUtil.getCounter(schoolId, 6, "packageCode"));
|
|
|
|
+ examDetail.setSchoolId(schoolId);
|
|
|
|
+ examDetail.setOrgId(sysUser.getOrgId());
|
|
|
|
+ examDetail.setPrintPlanId(examPrintPlan.getId());
|
|
|
|
+ examDetail.setPrintPlanName(examPrintPlan.getName());
|
|
|
|
+ examDetail.setExamId(examPrintPlan.getExamId());
|
|
|
|
+ examDetail.setExamPlace(examPlace);
|
|
|
|
+ examDetail.setExamRoom(examRoom);
|
|
|
|
+ examDetail.setStatus(ExamDetailStatusEnum.NEW);
|
|
|
|
+ examDetail.setTotalSubjects(examDetailStudentList.size());
|
|
|
|
+ examDetail.setExamStartTime(examStartTime);
|
|
|
|
+ examDetail.setExamEndTime(examEndTime);
|
|
|
|
+ examDetail.setExamDataSource(ExamDataSourceEnum.FILE_IMPORT);
|
|
|
|
+ examDetail.setNormal(true);
|
|
|
|
+ examDetail.setCreateId(sysUser.getId());
|
|
|
|
+ examDetail.setBackupCount(examPrintPlan.getBackupCount());
|
|
|
|
+ examDetailService.save(examDetail);
|
|
|
|
+
|
|
|
|
+ //组装exam_detail_course数据
|
|
|
|
+ List<Map<String, Object>> examDetailCourseKeyList = examDetailStudentList.stream().flatMap(e -> {
|
|
|
|
+ Map<String, Object> examDetailCourseMap = new HashMap<>();
|
|
|
|
+ examDetailCourseMap.put("courseCode", e.getCourseCode());
|
|
|
|
+ examDetailCourseMap.put("paperNumber", e.getPaperNumber());
|
|
|
|
+ return Stream.of(examDetailCourseMap);
|
|
|
|
+ }).distinct().collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ for (Map<String, Object> examDetailCourseMap : examDetailCourseKeyList) {
|
|
|
|
+ String courseCode = String.valueOf(examDetailCourseMap.get("courseCode"));
|
|
|
|
+ String paperNumber = String.valueOf(examDetailCourseMap.get("paperNumber"));
|
|
|
|
+
|
|
|
|
+ // 获取该科目下的考生人数
|
|
|
|
+ List<BasicExamStudent> examDetailCourseStudentList = examDetailStudentList.stream().filter(e -> e.getCourseCode().equals(courseCode) &&
|
|
|
|
+ e.getPaperNumber().equals(paperNumber)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ ExamDetailCourse examDetailCourse = new ExamDetailCourse();
|
|
|
|
+ examDetailCourse.setId(SystemConstant.getDbUuid());
|
|
|
|
+ examDetailCourse.setSchoolId(schoolId);
|
|
|
|
+ examDetailCourse.setExamDetailId(examDetail.getId());
|
|
|
|
+ examDetailCourse.setCourseCode(courseCode);
|
|
|
|
+ examDetailCourse.setCourseName(examTask.getCourseName());
|
|
|
|
+ examDetailCourse.setPaperNumber(paperNumber);
|
|
|
|
+ examDetailCourse.setCoursePaperId(courseCode.concat(examTask.getSequence()));
|
|
|
|
+ examDetailCourse.setTotalSubjects(examDetailCourseStudentList.size());
|
|
|
|
+ examDetailCourse.setCreateId(sysUser.getId());
|
|
|
|
+ Set<Long> teachClazzIds = examDetailCourseStudentList.stream().filter(m -> m.getClazzId() != null).map(BasicExamStudent::getClazzId).collect(Collectors.toSet());
|
|
|
|
+ List<BasicTeachClazz> basicTeachClazzes = basicTeachClazzService.listByIds(teachClazzIds);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(basicTeachClazzes)) {
|
|
|
|
+ examDetailCourse.setClazzName(basicTeachClazzes.stream().map(BasicTeachClazz::getClazzName).collect(Collectors.joining(",")));
|
|
|
|
+ }
|
|
|
|
+ examDetailCourseService.save(examDetailCourse);
|
|
|
|
+
|
|
|
|
+ //组装exam_student数据
|
|
|
|
+ List<ExamStudent> examStudentList = new ArrayList<>();
|
|
|
|
+ AtomicInteger atomicInteger = new AtomicInteger(1);
|
|
|
|
+ for (BasicExamStudent basicExamStudent : examDetailCourseStudentList) {
|
|
|
|
+ ExamStudent examStudent = new ExamStudent();
|
|
|
|
+ examStudent.setId(SystemConstant.getDbUuid());
|
|
|
|
+ examStudent.setSchoolId(schoolId);
|
|
|
|
+ examStudent.setOrgId(sysUser.getOrgId());
|
|
|
|
+ examStudent.setExamId(examTask.getExamId());
|
|
|
|
+ examStudent.setExamDetailCourseId(examDetailCourse.getId());
|
|
|
|
+ examStudent.setPaperNumber(paperNumber);
|
|
|
|
+ examStudent.setCoursePaperId(examDetailCourse.getCoursePaperId());
|
|
|
|
+ examStudent.setStudentCode(basicExamStudent.getStudentCode());
|
|
|
|
+ examStudent.setStudentName(basicExamStudent.getStudentName());
|
|
|
|
+ examStudent.setSiteNumber(String.valueOf(atomicInteger.getAndIncrement()));
|
|
|
|
+ examStudent.setCollegeName(basicExamStudent.getCollege());
|
|
|
|
+ examStudent.setMajorName(basicExamStudent.getMajor());
|
|
|
|
+ examStudent.setTeacherId(basicExamStudent.getTeacherId());
|
|
|
|
+ BasicTeachClazz basicTeachClazz = basicTeachClazzService.getById(basicExamStudent.getClazzId());
|
|
|
|
+ examStudent.setTeachClazzId(basicExamStudent.getClazzId());
|
|
|
|
+ examStudent.setTeachClazzName(basicTeachClazz != null ? basicTeachClazz.getClazzName() : null);
|
|
|
|
+ examStudent.setCreateId(sysUser.getId());
|
|
|
|
+ examStudentList.add(examStudent);
|
|
|
|
+ }
|
|
|
|
+ examStudentService.saveBatch(examStudentList);
|
|
|
|
+ examDetailList.add(examDetail);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return examDetailList;
|
|
|
|
+ }
|
|
|
|
+
|
|
private ExamTaskPaperData saveTikuPaperData(Long examId, Long paperId, String uuid, File zipFile) {
|
|
private ExamTaskPaperData saveTikuPaperData(Long examId, Long paperId, String uuid, File zipFile) {
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
String zipDestPath = null;
|
|
String zipDestPath = null;
|