Browse Source

错题集返回听力文件

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

+ 0
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaperQtypeQuestion.java View File

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

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

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

+ 3
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java View File

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

+ 5
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java View File

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

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionClassDetailVo.java View File

64
     private List<Map> sonqlist;//子题
64
     private List<Map> sonqlist;//子题
65
 
65
 
66
     private Integer classid;//班级id
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 View File

60
 
60
 
61
     //班级错题id
61
     //班级错题id
62
     private Integer qcid;
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 View File

73
     private Integer complexity;
73
     private Integer complexity;
74
 
74
 
75
     private List<Map> sonqlist;//子题
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 View File

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

96
         order by answertime desc
96
         order by answertime desc
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
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
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
118
             ,ptq.mqtypeid qtypeid,ptq.ptqorder qorder,max(q.checked)checked
118
             ,ptq.mqtypeid qtypeid,ptq.ptqorder qorder,max(q.checked)checked
119
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'answertype',q.answertype
119
             ,concat('[',group_concat(json_object('questionid',q.questionid,'qn',q.qn,'answertype',q.answertype
120
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
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
             ,(select tq.hashear from t_question tq where tq.questionid=ptq.questionpid)hashear
122
             ,(select tq.hashear from t_question tq where tq.questionid=ptq.questionpid)hashear
123
             from t_paper_student_question q left join t_paper_qtype_question ptq on q.questionid=ptq.questionid and q.paperid=ptq.paperid
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
             where q.paperid=#{paperid} and q.classid=#{classid}
124
             where q.paperid=#{paperid} and q.classid=#{classid}
128
             select q.studentid,q.qscore,q.stuscore,q.pscaid questionid,ps.qtypeid,ps.psorder qorder
128
             select q.studentid,q.qscore,q.stuscore,q.pscaid questionid,ps.qtypeid,ps.psorder qorder
129
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qorder,'answertype',q.answertype
129
             ,concat('[',group_concat(json_object('questionid',q.pscaid,'qn',q.qorder,'answertype',q.answertype
130
             ,'useranswer',q.useranswer,'useranswertxt',q.useranswertxt,'converted',q.converted
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
             from t_paper_student_scantron q left join t_paper_scantron ps on q.pscaid=ps.pscaid
132
             from t_paper_student_scantron q left join t_paper_scantron ps on q.pscaid=ps.pscaid
133
             where q.paperid=#{paperid} and q.classid=#{classid} and q.checked=1 and q.stuscore!=q.qscore
133
             where q.paperid=#{paperid} and q.classid=#{classid} and q.checked=1 and q.stuscore!=q.qscore
134
             group by q.pscaid,q.studentid,q.classid
134
             group by q.pscaid,q.studentid,q.classid

Loading…
Cancel
Save