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
     //是否是听力题0不是1是
47
     //是否是听力题0不是1是
48
     private Integer hashear=0;
48
     private Integer hashear=0;
49
 
49
 
50
+    private String qn;//题号
51
+
50
     @Transient
52
     @Transient
51
     //学生总得分
53
     //学生总得分
52
     private Double stuscore;
54
     private Double stuscore;

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

71
     //是否是听力题0不是1是
71
     //是否是听力题0不是1是
72
     private Integer hashear=0;
72
     private Integer hashear=0;
73
 
73
 
74
+    private String qn;//题号
75
+
74
     @Transient
76
     @Transient
75
     //开始时间
77
     //开始时间
76
     private Integer starttime;
78
     private Integer starttime;

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

66
 
66
 
67
     //听力题文件地址
67
     //听力题文件地址
68
     private String hearfile;
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
 
79
 
80
     //听力题文件地址
80
     //听力题文件地址
81
     private String hearfile;
81
     private String hearfile;
82
+
83
+    private String qn;//题号
82
 }
84
 }

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

84
     </select>
84
     </select>
85
     <!--作业统计按题-->
85
     <!--作业统计按题-->
86
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo">
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
         ,group_concat(distinct concat(ptq.qn,'_',ptq.questionid))qns
88
         ,group_concat(distinct concat(ptq.qn,'_',ptq.questionid))qns
89
         ,ptq.mqtypename qtypename,ptq.mscore totalscore,truncate(avg(psq.stuscore),2)avgscore
89
         ,ptq.mqtypename qtypename,ptq.mscore totalscore,truncate(avg(psq.stuscore),2)avgscore
90
         ,truncate(avg(psq.costtime),2)avgtime,min(psq.costtime)mintime,count(ps.psid)stunum
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
 <mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionClassMapper">
3
 <mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionClassMapper">
4
     <!--作业统计按题-->
4
     <!--作业统计按题-->
5
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
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
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid}
7
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid}
8
         <if test="qctype==3">and locate(concat('"',ptq.questionpid,'"'),ps.questionids)>0</if>)stunum
8
         <if test="qctype==3">and locate(concat('"',ptq.questionpid,'"'),ps.questionids)>0</if>)stunum
9
         ,(select q.hashear from t_question q where q.questionid=ptq.questionpid)hashear
9
         ,(select q.hashear from t_question q where q.questionid=ptq.questionpid)hashear
14
     </select>
14
     </select>
15
     <!--答题卡作业统计按题-->
15
     <!--答题卡作业统计按题-->
16
     <select id="getSQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
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
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid})stunum
18
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid})stunum
19
         from t_paper_scantron ps left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid and pss.classid=#{classid}
19
         from t_paper_scantron ps left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid and pss.classid=#{classid}
20
         where ps.paperid=#{paperid}
20
         where ps.paperid=#{paperid}
32
     <!--章节班级错题列表-->
32
     <!--章节班级错题列表-->
33
     <select id="directorList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
33
     <select id="directorList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
34
         select qc.qcid,qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype,qc.qtypeid
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
         from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
36
         from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
37
         questionid)a
37
         questionid)a
38
         left join t_question_class qc on a.qcid=qc.qcid
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
     </select>
9
     </select>
10
     <!--列表-->
10
     <!--列表-->
11
     <select id="findAll" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
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
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
13
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
15
         <if test="qs.starttime!=null and qs.starttime!=0">
15
         <if test="qs.starttime!=null and qs.starttime!=0">
41
 
41
 
42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
43
     <select id="listForWeb" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
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
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
46
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
47
         where qs.studentid=#{question.studentid} and qs.delstate=0
47
         where qs.studentid=#{question.studentid} and qs.delstate=0
48
         <if test="question.starttime!=null and question.starttime!=0">
48
         <if test="question.starttime!=null and question.starttime!=0">
68
     </select>
68
     </select>
69
     <!--更新错题信息-->
69
     <!--更新错题信息-->
70
     <update id="updateQuestion">
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
         ,qscore=#{qs.qscore},stuscore=#{qs.stuscore},scorerate=#{qs.scorerate},paperid=#{qs.paperid}
72
         ,qscore=#{qs.qscore},stuscore=#{qs.stuscore},scorerate=#{qs.scorerate},paperid=#{qs.paperid}
73
         ,errornum=errornum+1,delstate=0,handletime=#{qs.handletime},stujson=#{qs.stujson}
73
         ,errornum=errornum+1,delstate=0,handletime=#{qs.handletime},stujson=#{qs.stujson}
74
         where qsid=#{qs.qsid}
74
         where qsid=#{qs.qsid}
97
     </select>
97
     </select>
98
     <select id="detail" resultMap="questionResult">
98
     <select id="detail" resultMap="questionResult">
99
         select q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.questionid,q.hashear,q.hearfile
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
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
101
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
102
         left join t_point p on qp.pointid = p.pointid where qp.questionid=qs.questionid)pointname
102
         left join t_point p on qp.pointid = p.pointid where qp.questionid=qs.questionid)pointname
103
         from t_question_student qs left join t_question q on qs.questionid=q.questionid
103
         from t_question_student qs left join t_question q on qs.questionid=q.questionid
105
     </select>
105
     </select>
106
     <!--附件试题详情-->
106
     <!--附件试题详情-->
107
     <select id="sdetail" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
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
         ,ps.psanswer qanswer,ps.ctype,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid
109
         ,ps.psanswer qanswer,ps.ctype,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid
110
         from t_question_student qs left join t_paper_scantron ps on qs.questionid=ps.pscaid
110
         from t_question_student qs left join t_paper_scantron ps on qs.questionid=ps.pscaid
111
         left join t_paper p on p.paperid=qs.paperid
111
         left join t_paper p on p.paperid=qs.paperid
116
     <select id="listQuestions" resultType="com.xhkjedu.sstudy.model.question.TQuestionStudent">
116
     <select id="listQuestions" resultType="com.xhkjedu.sstudy.model.question.TQuestionStudent">
117
         <if test="qctype==1 or qctype==3">
117
         <if test="qctype==1 or qctype==3">
118
             select q.studentid,ptq.mscore qscore,sum(q.stuscore)stuscore,ptq.questionpid questionid
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
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
120
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
121
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
121
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
122
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ptq.ctype)),']')stujson
122
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ptq.ctype)),']')stujson
126
             group by ptq.questionpid,q.studentid,q.classid HAVING checked=1 and qscore!=stuscore
126
             group by ptq.questionpid,q.studentid,q.classid HAVING checked=1 and qscore!=stuscore
127
         </if>
127
         </if>
128
         <if test="qctype==2">
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
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
130
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qn,'qorder',q.qorder,'answertype',q.answertype
131
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
131
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
132
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ps.ctype)),']')stujson
132
             ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ps.ctype)),']')stujson

Loading…
Cancel
Save