From afc2b4d2800d91c793523d14fbe2d6fbbd319fc0 Mon Sep 17 00:00:00 2001
From: 钟日健 <5689795+arsn@user.noreply.gitee.com>
Date: Fri, 25 Feb 2022 09:02:41 +0800
Subject: [PATCH] 模拟考试开始修改,返回所有题目的所有答题信息

---
 src/main/java/org/springblade/modules/simulateexam/service/impl/SimulateExamRecordServiceImpl.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/springblade/modules/simulateexam/service/impl/SimulateExamRecordServiceImpl.java b/src/main/java/org/springblade/modules/simulateexam/service/impl/SimulateExamRecordServiceImpl.java
index 11f58e8..8e646bd 100644
--- a/src/main/java/org/springblade/modules/simulateexam/service/impl/SimulateExamRecordServiceImpl.java
+++ b/src/main/java/org/springblade/modules/simulateexam/service/impl/SimulateExamRecordServiceImpl.java
@@ -99,13 +99,13 @@
 				List<ExamSubjectChoicesVO> radioRandomSubjectList = examPaperService.queryRandomSubjectList(radio,25);
 				List<ExamSubjectChoicesVO> checkboxRandomSubjectList = examPaperService.queryRandomSubjectList(checkbox,10);
 				List<ExamSubjectChoicesVO> judgeRandomSubjectList = examPaperService.queryRandomSubjectList(judge,20);
-				List<ExamSubjectChoicesVO> sortRandomSubjectList = examPaperService.queryRandomSubjectList(sort,5);
+//				List<ExamSubjectChoicesVO> sortRandomSubjectList = examPaperService.queryRandomSubjectList(sort,5);
 
 				//合并集合数据
 				choicesVOList.addAll(radioRandomSubjectList);
 				choicesVOList.addAll(checkboxRandomSubjectList);
 				choicesVOList.addAll(judgeRandomSubjectList);
-				choicesVOList.addAll(sortRandomSubjectList);
+//				choicesVOList.addAll(sortRandomSubjectList);
 
 				//取出考试id
 				List<Long> longList = choicesVOList.stream().map(ExamSubjectChoicesVO::getId).collect(Collectors.toList());
@@ -124,9 +124,14 @@
 				simulateExamRecord.setStatus(1);
 				//新增模拟考试记录信息
 				boolean status = this.save(simulateExamRecord);
+
+				ExamSubjectChoices examSubjectChoices = new ExamSubjectChoices();
+				examSubjectChoices.setId(choicesVOList.get(0).getId());
+				ExamSubjectChoicesVO examSubjectChoicesVO = examSubjectChoicesService.selectExamSubjectChoicesInfo(examSubjectChoices);
 				if (status){
 					map.put("simulateExamRecord",simulateExamRecord);
 					map.put("examSubjectInfo",choicesVOList);
+					map.put("examSubjectChoicesVO",examSubjectChoicesVO);
 					//返回信息
 					return map;
 				}
@@ -165,7 +170,7 @@
 
 	/**
 	 * 考试暂停后继续,1查询所有的答题信息,2查询所有的已答信息  3其他信息
-	 * @param simulateExamRecord 必须包含 模拟考试id,id_card_no, type 1: 继续考试  2: 放弃之前的考试,重新生成题目考试
+	 * @param simulateExamRecord 必须包含 模拟考试id,, type 1: 继续考试  2: 放弃之前的考试,重新生成题目考试
 	 * @return
 	 */
 	@Override

--
Gitblit v1.9.3