|
@@ -1,12 +1,47 @@
|
|
|
package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
+import java.io.InputStream;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.Comparator;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
+import java.util.UUID;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+import org.apache.commons.codec.digest.DigestUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.qmth.themis.business.bean.exam.*;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamFileUploadBean;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamFinishBean;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamPrepareBean;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamResultBean;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamResumeBean;
|
|
|
+import com.qmth.themis.business.bean.exam.ExamStartBean;
|
|
|
+import com.qmth.themis.business.bean.exam.StudentPaperStructBean;
|
|
|
import com.qmth.themis.business.cache.ExamActivityRecordCacheUtil;
|
|
|
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
|
import com.qmth.themis.business.cache.RedisKeyHelper;
|
|
|
-import com.qmth.themis.business.cache.bean.*;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamCourseCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamPaperCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamStudentAnswerCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamStudentPaperStructCacheBean;
|
|
|
import com.qmth.themis.business.config.SystemConfig;
|
|
|
import com.qmth.themis.business.dao.TEExamMapper;
|
|
|
import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
@@ -16,24 +51,15 @@ import com.qmth.themis.business.entity.TEExam;
|
|
|
import com.qmth.themis.business.entity.TOeExamRecord;
|
|
|
import com.qmth.themis.business.enums.ExamRecordStatusEnum;
|
|
|
import com.qmth.themis.business.enums.FinishTypeEnum;
|
|
|
-import com.qmth.themis.business.service.*;
|
|
|
+import com.qmth.themis.business.service.TEExamActivityService;
|
|
|
+import com.qmth.themis.business.service.TEExamCourseService;
|
|
|
+import com.qmth.themis.business.service.TEExamPaperService;
|
|
|
+import com.qmth.themis.business.service.TEExamService;
|
|
|
+import com.qmth.themis.business.service.TEExamStudentService;
|
|
|
+import com.qmth.themis.business.service.TOeExamRecordService;
|
|
|
import com.qmth.themis.business.util.OssUtil;
|
|
|
import com.qmth.themis.business.util.RedisUtil;
|
|
|
-import com.qmth.themis.business.util.ServletUtil;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
-import org.apache.commons.codec.digest.DigestUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
-import org.springframework.cache.annotation.Cacheable;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @Description: 考试批次 服务实现类
|
|
@@ -302,7 +328,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
* 上传个人试卷结构
|
|
|
*/
|
|
|
@Override
|
|
|
- public Long studentPaperStruct(Long studentId, Long recordId, String content) {
|
|
|
+ public StudentPaperStructBean studentPaperStruct(Long studentId, Long recordId, String content) {
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
@@ -323,7 +349,9 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
struct.setTime(System.currentTimeMillis());
|
|
|
// 更新考生试卷结构
|
|
|
redisUtil.set(RedisKeyHelper.studentPaperStructKey(recordId), struct);
|
|
|
- return struct.getTime();
|
|
|
+ StudentPaperStructBean ret=new StudentPaperStructBean();
|
|
|
+ ret.setUpdateTime(struct.getTime());
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
/**
|