From 8e8c3113eea4c29a6c5a23ca35c4d460e81f3465 Mon Sep 17 00:00:00 2001
From: 钟日健 <5689795+arsn@user.noreply.gitee.com>
Date: Thu, 24 Feb 2022 09:47:03 +0800
Subject: [PATCH] 暂停模拟考试后,继续考试修改,状态修改为考试中,题目查询按本次模拟考试题目排序,接口放行

---
 src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
index dc3951e..4b60a6d 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -492,10 +492,10 @@
         bu.real_name securityName,
         bd.dept_name companyName,
         es.theory_grade theoryGrade,es.learn_grade learnGrade,es.all_grade allGrade,
-        case when str.is_exam=2 then "发布成绩"
-        when str.is_exam=3 then "考试中"
-        when str.is_exam=4 then "缺考"
-        when str.is_exam=5 then "纸质考试"
+        case when es.qualified=0 then "合格"
+        when es.qualified=1 then "不合格"
+        when es.qualified=2 then "暂未录入实操成绩"
+        when es.qualified=3 then "缺考"
         else "" end as sortName
         from
         exam_score es
@@ -534,4 +534,23 @@
         ) aa,(select @i:=0) bb
     </select>
 
+    <select id="queryRandomSubjectList" resultType="org.springblade.modules.exam.vo.ExamSubjectChoicesVO">
+        select
+        id,
+        category_id categoryId,
+        subject_name subjectName,
+        choices_type choicesType,
+        score,
+        analysis,
+        tktype
+        from (
+            select * from exam_subject_choices
+            where id in
+            <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        ) a ORDER BY RAND() LIMIT #{number}
+    </select>
+
+
 </mapper>

--
Gitblit v1.9.3