Bladeren bron

错题集返回听力文件

tags/正式版本
雍文秀 2 jaren geleden
bovenliggende
commit
d12631ccaf

+ 0
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaperQtypeQuestion.java Bestand weergeven

@@ -5,7 +5,6 @@ import lombok.Data;
5 5
 
6 6
 import javax.persistence.Id;
7 7
 import javax.persistence.Table;
8
-import javax.persistence.Transient;
9 8
 
10 9
 @Table(name = "t_paper_qtype_question")
11 10
 @Data
@@ -52,7 +51,6 @@ public class TPaperQtypeQuestion extends BaseBean {
52 51
     //母题题型名称
53 52
     private String mqtypename;
54 53
 
55
-    @Transient
56 54
     //处理题型1单选题2多选题3主观题4判断对错5判断✔6判断TF7完形填空8阅读理解
57 55
     private Integer ctype;
58 56
 }

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java Bestand weergeven

@@ -445,6 +445,7 @@ public class PaperService {
445 445
                     ptq.setMscore(q.getScore());
446 446
                     ptq.setMqtypeid(q.getQtypeid());
447 447
                     ptq.setMqtypename(q.getQtypename());
448
+                    ptq.setCtype(q.getCtype());
448 449
                     ptqs.add(ptq);
449 450
                 } else {
450 451
                     Integer sorder = 1;
@@ -463,6 +464,7 @@ public class PaperService {
463 464
                         ptq.setMscore(q.getScore());
464 465
                         ptq.setMqtypeid(q.getQtypeid());
465 466
                         ptq.setMqtypename(q.getQtypename());
467
+                        ptq.setCtype((Integer) sq.get("ctype"));
466 468
                         sorder++;
467 469
                         ptqs.add(ptq);
468 470
                     }

+ 3
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java Bestand weergeven

@@ -147,6 +147,8 @@ public class QuestionClassService {
147 147
                 q.setQoption(vo.getQoption());
148 148
                 q.setQtypename(vo.getQtypename());
149 149
                 q.setCount(vo.getCount());
150
+                q.setHashear(vo.getHashear());
151
+                q.setHearfile(vo.getHearfile());
150 152
             } else if (qctype == 2) {
151 153
                 QuestionClassVo vo = scantrons.stream().filter(tq -> tq.getQuestionid().equals(q.getQuestionid())).findFirst().orElse(null);
152 154
                 q.setCtype(vo.getCtype());
@@ -230,7 +232,7 @@ public class QuestionClassService {
230 232
             if(hearnum!=null && hearnum >0){
231 233
                 SubjectQuestiontypeVo qt = new SubjectQuestiontypeVo();
232 234
                 qt.setQtypename("听力题");
233
-                qt.setQtypename("tlt");
235
+                qt.setQtypeid("tlt");
234 236
                 list.add(0,qt);
235 237
             }
236 238
         }

+ 5
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java Bestand weergeven

@@ -97,6 +97,8 @@ public class QuestionStudentService {
97 97
                 q.setQstem(vo.getQstem());
98 98
                 q.setQoption(vo.getQoption());
99 99
                 q.setQtypename(vo.getQtypename());
100
+                q.setHashear(vo.getHashear());
101
+                q.setHearfile(vo.getHearfile());
100 102
             } else if (qctype == 2) {
101 103
                 QuestionClassVo vo = scantrons.stream().filter(tq -> tq.getQuestionid().equals(q.getQuestionid())).findFirst().orElse(null);
102 104
                 q.setCtype(vo.getCtype());
@@ -209,7 +211,7 @@ public class QuestionStudentService {
209 211
             if(hearnum!=null && hearnum >0){
210 212
                 SubjectQuestiontypeVo qt = new SubjectQuestiontypeVo();
211 213
                 qt.setQtypename("听力题");
212
-                qt.setQtypename("tlt");
214
+                qt.setQtypeid("tlt");
213 215
                 list.add(0,qt);
214 216
             }
215 217
         }
@@ -231,6 +233,8 @@ public class QuestionStudentService {
231 233
                 q.setQstem(vo.getQstem());
232 234
                 q.setQoption(vo.getQoption());
233 235
                 q.setQtypename(vo.getQtypename());
236
+                q.setHashear(vo.getHashear());
237
+                q.setHearfile(vo.getHearfile());
234 238
             } else if (qctype == 2) {
235 239
                 QuestionClassVo vo = scantrons.stream().filter(tq -> tq.getQuestionid().equals(q.getQuestionid())).findFirst().orElse(null);
236 240
                 q.setCtype(vo.getCtype());

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionClassDetailVo.java Bestand weergeven

@@ -64,6 +64,12 @@ public class QuestionClassDetailVo {
64 64
     private List<Map> sonqlist;//子题
65 65
 
66 66
     private Integer classid;//班级id
67
+
68
+    //是否是听力题0不是1是
69
+    private Integer hashear;
70
+
71
+    //听力题文件地址
72
+    private String hearfile;
67 73
 }
68 74
 
69 75
 /**

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionClassVo.java Bestand weergeven

@@ -60,4 +60,10 @@ public class QuestionClassVo {
60 60
 
61 61
     //班级错题id
62 62
     private Integer qcid;
63
+
64
+    //是否是听力题0不是1是
65
+    private Integer hashear;
66
+
67
+    //听力题文件地址
68
+    private String hearfile;
63 69
 }

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionStudentVo.java Bestand weergeven

@@ -73,4 +73,10 @@ public class QuestionStudentVo {
73 73
     private Integer complexity;
74 74
 
75 75
     private List<Map> sonqlist;//子题
76
+
77
+    //是否是听力题0不是1是
78
+    private Integer hashear;
79
+
80
+    //听力题文件地址
81
+    private String hearfile;
76 82
 }

+ 8
- 5
sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml Bestand weergeven

@@ -61,7 +61,8 @@
61 61
     </select>
62 62
     <!--根据试题id获取试题信息-->
63 63
     <select id="getQuestionById" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
64
-        select q.questionid,q.ctype,q.qstem,q.qoption,q.qtypename,q.count from t_question q where
64
+        select q.questionid,q.ctype,q.qstem,q.qoption,q.qtypename,q.count,q.hashear,q.hearfile
65
+        from t_question q where
65 66
         <foreach collection="questionids" item="questionid" index="index" separator="or">
66 67
             q.questionid=#{questionid}
67 68
         </foreach>
@@ -76,7 +77,7 @@
76 77
     <!--知识点班级错题列表-->
77 78
     <select id="pointList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
78 79
         select qc.qcid,qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype
79
-        ,q.ctype,q.qstem,q.qoption,q.qtypeid,q.qtypename,q.count
80
+        ,q.ctype,q.qstem,q.qoption,q.qtypeid,q.qtypename,q.count,q.hashear,q.hearfile
80 81
         from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
81 82
         questionid)a
82 83
         left join t_question_class qc on a.qcid=qc.qcid
@@ -134,6 +135,8 @@
134 135
         <result property="ytjnum" column="ytjnum"></result>
135 136
         <result property="wtjnum" column="wtjnum"></result>
136 137
         <result property="pointname" column="pointname"></result>
138
+        <result property="hashear" column="hashear"></result>
139
+        <result property="hearfile" column="hearfile"></result>
137 140
         <collection property="stus" ofType="com.xhkjedu.sstudy.vo.question.AnswerStu">
138 141
             <result property="section" column="section"></result>
139 142
             <result property="stunum" column="stunum"></result>
@@ -155,7 +158,7 @@
155 158
     </select>
156 159
     <!--客观题详情-->
157 160
     <select id="objectiveDetail" resultMap="questionResult">
158
-        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity
161
+        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity,q.hashear,q.hearfile
159 162
         ,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
160 163
         ,psq.useranswer section,count(psq.psqid)stunum,psq.stuscore,group_concat(u.username order by convert(u.username using gbk) separator '  ')stuname
161 164
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
@@ -180,7 +183,7 @@
180 183
     </select>
181 184
     <!--主观题详情-->
182 185
     <select id="subjectiveDetail" resultMap="questionResult">
183
-        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity
186
+        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity,q.hashear,q.hearfile
184 187
         ,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
185 188
         ,psq.stuscore,u.username stuname
186 189
         ,(select count(*) from t_paper_student ps where ps.paperid=qc.paperid and ps.classid=qc.classid)wtjnum
@@ -252,7 +255,7 @@
252 255
         where paperid=#{question.paperid} and classid=#{question.classid} and questionpid=#{question.questionid}
253 256
     </select>
254 257
     <select id="complexDetail" resultMap="complexResult">
255
-        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity
258
+        select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity,q.hashear,q.hearfile
256 259
         ,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
257 260
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
258 261
         left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname

+ 3
- 3
sstudy/src/main/resources/mapper/question/QuestionStudentMapper.xml Bestand weergeven

@@ -96,7 +96,7 @@
96 96
         order by answertime desc
97 97
     </select>
98 98
     <select id="detail" resultMap="questionResult">
99
-        select q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.questionid
99
+        select q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.questionid,q.hashear,q.hearfile
100 100
         ,qs.qsid,qs.qscore,qs.stuscore,qs.stujson,qs.paperid,qs.studentid,qs.qorder
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
@@ -118,7 +118,7 @@
118 118
             ,ptq.mqtypeid qtypeid,ptq.ptqorder qorder,max(q.checked)checked
119 119
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'answertype',q.answertype
120 120
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
121
-            ,'qscore',q.qscore,'stuscore',q.stuscore)),']')stujson
121
+            ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ptq.ctype)),']')stujson
122 122
             ,(select tq.hashear from t_question tq where tq.questionid=ptq.questionpid)hashear
123 123
             from t_paper_student_question q left join t_paper_qtype_question ptq on q.questionid=ptq.questionid and q.paperid=ptq.paperid
124 124
             where q.paperid=#{paperid} and q.classid=#{classid}
@@ -128,7 +128,7 @@
128 128
             select q.studentid,q.qscore,q.stuscore,q.pscaid questionid,ps.qtypeid,ps.psorder qorder
129 129
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qorder,'answertype',q.answertype
130 130
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
131
-            ,'qscore',q.qscore,'stuscore',q.stuscore)),']')stujson
131
+            ,'qscore',q.qscore,'stuscore',q.stuscore,'ctype',ps.ctype)),']')stujson
132 132
             from t_paper_student_scantron q left join t_paper_scantron ps on q.pscaid=ps.pscaid
133 133
             where q.paperid=#{paperid} and q.classid=#{classid} and q.checked=1 and q.stuscore!=q.qscore
134 134
             group by q.pscaid,q.studentid,q.classid

Laden…
Annuleren
Opslaan