|
@@ -5,6 +5,8 @@ import com.google.gson.Gson;
|
|
import com.qmth.themis.business.annotation.ApiJsonObject;
|
|
import com.qmth.themis.business.annotation.ApiJsonObject;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
|
|
+import com.qmth.themis.business.cache.RedisKeyHelper;
|
|
|
|
+import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
@@ -176,16 +178,25 @@ public class TEStudentController {
|
|
//测试
|
|
//测试
|
|
String test = SignatureInfo.build(SignatureType.TOKEN, sessionId, token);
|
|
String test = SignatureInfo.build(SignatureType.TOKEN, sessionId, token);
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
- //获取未完/待考列表
|
|
|
|
- Map unFinishExam = tOeExamRecordService.getUnFinishExam(teStudent.getId(), examId, orgId);
|
|
|
|
- if (Objects.isNull(unFinishExam)) {
|
|
|
|
|
|
+ //获取未完考试
|
|
|
|
+ if(Objects.isNull(teStudentCacheDto.getUnFinishedRecordId())){
|
|
|
|
+ //获取待考列表
|
|
List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
|
|
List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
map.put("waiting", list);
|
|
map.put("waiting", list);
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- map.put("unFinished", unFinishExam);
|
|
|
|
|
|
+ }else{
|
|
|
|
+ //获取考试记录缓存
|
|
|
|
+ Map<String,Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examRecordCacheKey(teStudentCacheDto.getUnFinishedRecordId()));
|
|
|
|
+ //获取考试缓存
|
|
|
|
+ ExamCacheBean ec = teExamService.getExamCacheBean(Long.parseLong(String.valueOf(objectMap.get("examId"))));
|
|
|
|
+ Map finalMap = new HashMap();
|
|
|
|
+ finalMap.put("waiting", ec);
|
|
|
|
+ finalMap.put("activity",objectMap);
|
|
|
|
+ map.put("unFinished", finalMap);
|
|
}
|
|
}
|
|
|
|
+// Map unFinishExam = tOeExamRecordService.getUnFinishExam(teStudent.getId(), examId, orgId);
|
|
|
|
+// map.put("unFinished", unFinishExam);
|
|
//获取全局考试配置
|
|
//获取全局考试配置
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
// map.put(SystemConstant.ACCESS_TOKEN, token);
|
|
// map.put(SystemConstant.ACCESS_TOKEN, token);
|