Browse Source

错题集题号

tags/正式版本
雍文秀 2 years ago
parent
commit
6bc0d8a72e

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/question/TQuestionClass.java View File

@@ -47,6 +47,8 @@ public class TQuestionClass extends BaseBean {
47 47
     //是否是听力题0不是1是
48 48
     private Integer hashear=0;
49 49
 
50
+    private String qn;//题号
51
+
50 52
     @Transient
51 53
     //学生总得分
52 54
     private Double stuscore;

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/question/TQuestionStudent.java View File

@@ -71,6 +71,8 @@ public class TQuestionStudent extends BaseBean {
71 71
     //是否是听力题0不是1是
72 72
     private Integer hashear=0;
73 73
 
74
+    private String qn;//题号
75
+
74 76
     @Transient
75 77
     //开始时间
76 78
     private Integer starttime;

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionClassVo.java View File

@@ -66,4 +66,6 @@ public class QuestionClassVo {
66 66
 
67 67
     //听力题文件地址
68 68
     private String hearfile;
69
+
70
+    private String qn;//题号
69 71
 }

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionStudentVo.java View File

@@ -79,4 +79,6 @@ public class QuestionStudentVo {
79 79
 
80 80
     //听力题文件地址
81 81
     private String hearfile;
82
+
83
+    private String qn;//题号
82 84
 }

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml View File

@@ -84,7 +84,7 @@
84 84
     </select>
85 85
     <!--作业统计按题-->
86 86
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo">
87
-        select ptq.paperid,ptq.questionid,ptq.ptqorder,ptq.questionpid
87
+        select ptq.paperid,ptq.questionid,ptq.ptqorder,ptq.qn,ptq.questionpid
88 88
         ,group_concat(distinct concat(ptq.qn,'_',ptq.questionid))qns
89 89
         ,ptq.mqtypename qtypename,ptq.mscore totalscore,truncate(avg(psq.stuscore),2)avgscore
90 90
         ,truncate(avg(psq.costtime),2)avgtime,min(psq.costtime)mintime,count(ps.psid)stunum

+ 3
- 3
sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml View File

@@ -3,7 +3,7 @@
3 3
 <mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionClassMapper">
4 4
     <!--作业统计按题-->
5 5
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
6
-        select ptq.questionpid questionid,ptq.ptqorder qorder,ptq.mscore qscore,sum(ifnull(psq.stuscore,0))stuscore,ptq.schoolid,ptq.mqtypeid qtypeid
6
+        select ptq.questionpid questionid,ptq.ptqorder qorder,ptq.qn,ptq.mscore qscore,sum(ifnull(psq.stuscore,0))stuscore,ptq.schoolid,ptq.mqtypeid qtypeid
7 7
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid}
8 8
         <if test="qctype==3">and locate(concat('"',ptq.questionpid,'"'),ps.questionids)>0</if>)stunum
9 9
         ,(select q.hashear from t_question q where q.questionid=ptq.questionpid)hashear
@@ -14,7 +14,7 @@
14 14
     </select>
15 15
     <!--答题卡作业统计按题-->
16 16
     <select id="getSQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
17
-        select ps.pscaid questionid,ps.psorder qorder,ps.psscore qscore,sum(ifnull(pss.stuscore,0))stuscore,ps.schoolid,ps.qtypeid
17
+        select ps.pscaid questionid,ps.psorder qorder,ps.qn,ps.psscore qscore,sum(ifnull(pss.stuscore,0))stuscore,ps.schoolid,ps.qtypeid
18 18
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid})stunum
19 19
         from t_paper_scantron ps left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid and pss.classid=#{classid}
20 20
         where ps.paperid=#{paperid}
@@ -32,7 +32,7 @@
32 32
     <!--章节班级错题列表-->
33 33
     <select id="directorList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
34 34
         select qc.qcid,qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype,qc.qtypeid
35
-        ,concat(p.papername,'-第',qc.qorder,'题')qstem
35
+        ,concat(p.papername,'-第',qc.qn,'题')qstem
36 36
         from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
37 37
         questionid)a
38 38
         left join t_question_class qc on a.qcid=qc.qcid

+ 8
- 8
sstudy/src/main/resources/mapper/question/QuestionStudentMapper.xml View File

@@ -9,7 +9,7 @@
9 9
     </select>
10 10
     <!--列表-->
11 11
     <select id="findAll" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
12
-        select qs.qsid,qs.questionid,qs.qscore,qs.stuscore,qs.scorerate,qs.qctype,qs.qorder,qs.qtypeid,qs.paperid
12
+        select qs.qsid,qs.questionid,qs.qscore,qs.stuscore,qs.scorerate,qs.qctype,qs.qorder,qs.qn,qs.qtypeid,qs.paperid
13 13
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
14 14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
15 15
         <if test="qs.starttime!=null and qs.starttime!=0">
@@ -41,8 +41,8 @@
41 41
 
42 42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
43 43
     <select id="listForWeb" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
44
-        select qs.qsid,qs.questionid,qs.qscore,qs.stuscore,qs.scorerate,qs.qctype,qs.qorder
45
-        ,qs.qtypeid,concat(p.papername,'-第',qs.qorder,'题')qstem
44
+        select qs.qsid,qs.questionid,qs.qscore,qs.stuscore,qs.scorerate,qs.qctype,qs.qorder,qs.qn
45
+        ,qs.qtypeid,concat(p.papername,'-第',qs.qn,'题')qstem
46 46
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
47 47
         where qs.studentid=#{question.studentid} and qs.delstate=0
48 48
         <if test="question.starttime!=null and question.starttime!=0">
@@ -68,7 +68,7 @@
68 68
     </select>
69 69
     <!--更新错题信息-->
70 70
     <update id="updateQuestion">
71
-        update t_question_student set qtypeid=#{qs.qtypeid},qorder=#{qs.qorder}
71
+        update t_question_student set qtypeid=#{qs.qtypeid},qorder=#{qs.qorder},qn=#{qs.qn}
72 72
         ,qscore=#{qs.qscore},stuscore=#{qs.stuscore},scorerate=#{qs.scorerate},paperid=#{qs.paperid}
73 73
         ,errornum=errornum+1,delstate=0,handletime=#{qs.handletime},stujson=#{qs.stujson}
74 74
         where qsid=#{qs.qsid}
@@ -97,7 +97,7 @@
97 97
     </select>
98 98
     <select id="detail" resultMap="questionResult">
99 99
         select q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.questionid,q.hashear,q.hearfile
100
-        ,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid,qs.studentid,qs.qorder
100
+        ,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid,qs.studentid,qs.qorder,qs.qn
101 101
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
102 102
         left join t_point p on qp.pointid = p.pointid where qp.questionid=qs.questionid)pointname
103 103
         from t_question_student qs left join t_question q on qs.questionid=q.questionid
@@ -105,7 +105,7 @@
105 105
     </select>
106 106
     <!--附件试题详情-->
107 107
     <select id="sdetail" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
108
-        select concat(p.papername,'-第',qs.qorder,'题')qstem,p.hearfile
108
+        select concat(p.papername,'-第',qs.qn,'题')qstem,p.hearfile
109 109
         ,ps.psanswer qanswer,ps.ctype,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid
110 110
         from t_question_student qs left join t_paper_scantron ps on qs.questionid=ps.pscaid
111 111
         left join t_paper p on p.paperid=qs.paperid
@@ -116,7 +116,7 @@
116 116
     <select id="listQuestions" resultType="com.xhkjedu.sstudy.model.question.TQuestionStudent">
117 117
         <if test="qctype==1 or qctype==3">
118 118
             select q.studentid,ptq.mscore qscore,sum(q.stuscore)stuscore,ptq.questionpid questionid
119
-            ,ptq.mqtypeid qtypeid,ptq.ptqorder qorder,max(q.checked)checked
119
+            ,ptq.mqtypeid qtypeid,ptq.ptqorder qorder,q.qn,max(q.checked)checked
120 120
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
121 121
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
122 122
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ptq.ctype)),']')stujson
@@ -126,7 +126,7 @@
126 126
             group by ptq.questionpid,q.studentid,q.classid HAVING checked=1 and qscore!=stuscore
127 127
         </if>
128 128
         <if test="qctype==2">
129
-            select q.studentid,q.qscore,q.stuscore,q.pscaid questionid,ps.qtypeid,ps.psorder qorder
129
+            select q.studentid,q.qscore,q.stuscore,q.pscaid questionid,ps.qtypeid,ps.psorder qorder,q.qn
130 130
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
131 131
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
132 132
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ps.ctype)),']')stujson

Loading…
Cancel
Save