|
@@ -19,14 +19,6 @@
|
19
|
19
|
where ps.paperid=#{paperid}
|
20
|
20
|
group by ps.pscaid order by ps.psorder
|
21
|
21
|
</select>
|
22
|
|
- <!--考试统计按题-->
|
23
|
|
- <select id="getEQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
|
24
|
|
- select ps.pscaid questionid,ps.psorder qorder,ps.psscore qscore,sum(ifnull(pss.stuscore,0))stuscore,ps.schoolid,ps.ctype qtypeid
|
25
|
|
- ,(select count(*) from t_classroom_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid})stunum
|
26
|
|
- from t_classroom_paper_scantron ps left join t_classroom_paper_student_scantron pss on ps.pscaid=pss.pscaid
|
27
|
|
- where ps.paperid=#{paperid} and pss.classid=#{classid}
|
28
|
|
- group by ps.pscaid order by ps.psorder
|
29
|
|
- </select>
|
30
|
22
|
<!--详情-->
|
31
|
23
|
<select id="findById" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
|
32
|
24
|
select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong
|
|
@@ -38,7 +30,7 @@
|
38
|
30
|
</select>
|
39
|
31
|
<!--章节班级错题列表-->
|
40
|
32
|
<select id="directorList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
|
41
|
|
- select qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype,qc.qtypeid
|
|
33
|
+ select qc.qcid,qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype,qc.qtypeid
|
42
|
34
|
,concat(p.papername,'-第',qc.qorder,'题')qstem
|
43
|
35
|
from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
|
44
|
36
|
questionid)a
|
|
@@ -81,7 +73,7 @@
|
81
|
73
|
</select>
|
82
|
74
|
<!--知识点班级错题列表-->
|
83
|
75
|
<select id="pointList" resultType="com.xhkjedu.sstudy.vo.question.QuestionClassVo">
|
84
|
|
- select qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype
|
|
76
|
+ select qc.qcid,qc.questionid,qc.qscore,qc.avgscore,qc.errorrate,qc.qctype
|
85
|
77
|
,q.ctype,q.qstem,q.qoption,q.qtypeid,q.qtypename,q.count
|
86
|
78
|
from (select max(qcid)qcid,questionid from t_question_class where classid=#{question.classid} group by
|
87
|
79
|
questionid)a
|
|
@@ -165,39 +157,22 @@
|
165
|
157
|
,psq.useranswer section,count(psq.psqid)stunum,psq.stuscore,group_concat(u.username order by convert(u.username using gbk) separator ' ')stuname
|
166
|
158
|
,(select group_concat(p.pointname separator ' ') from t_question_point qp
|
167
|
159
|
left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
|
168
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
169
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype!=2)a
|
170
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
171
|
|
- left join t_question q on qc.questionid=q.questionid
|
|
160
|
+ from t_question_class qc left join t_question q on qc.questionid=q.questionid
|
172
|
161
|
left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid
|
173
|
162
|
and qc.questionid=psq.questionid and (psq.answered=1 or psq.checked=1)
|
174
|
163
|
left join t_user u on psq.studentid=u.userid
|
|
164
|
+ where qc.qcid=#{question.qcid}
|
175
|
165
|
group by psq.useranswer
|
176
|
166
|
</select>
|
177
|
167
|
<!--答题卡客观题详情-->
|
178
|
168
|
<select id="objectiveSDetail" resultMap="questionResult">
|
179
|
169
|
select ps.psanswer qanswer,qc.qscore,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
|
180
|
170
|
,pss.useranswer section,count(pss.pssid)stunum,pss.stuscore,group_concat(u.username order by convert(u.username using gbk) separator ' ')stuname
|
181
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
182
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype=2)a
|
183
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
184
|
|
- left join t_paper_scantron ps on qc.questionid=ps.pscaid
|
|
171
|
+ from t_question_class qc left join t_paper_scantron ps on qc.questionid=ps.pscaid
|
185
|
172
|
left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid and (pss.answered=1 or pss.checked=1)
|
186
|
|
- and pss.classid=#{question.classid}
|
187
|
|
- left join t_user u on pss.studentid=u.userid
|
188
|
|
- group by pss.useranswer
|
189
|
|
- </select>
|
190
|
|
- <!--考试客观题详情-->
|
191
|
|
- <select id="objectiveEDetail" resultMap="questionResult">
|
192
|
|
- select ps.psanswer qanswer,qc.qscore,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
|
193
|
|
- ,pss.useranswer section,count(pss.pssid)stunum,pss.stuscore,group_concat(u.username order by convert(u.username using gbk) separator ' ')stuname
|
194
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
195
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype in(3,13,14,15))a
|
196
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
197
|
|
- left join t_classroom_paper_scantron ps on qc.questionid=ps.pscaid
|
198
|
|
- left join t_classroom_paper_student_scantron pss on ps.pscaid=pss.pscaid and (pss.answered=1 or pss.checked=1)
|
199
|
|
- and pss.classid=#{question.classid}
|
|
173
|
+ and pss.classid=qc.classid
|
200
|
174
|
left join t_user u on pss.studentid=u.userid
|
|
175
|
+ where qc.qcid=#{question.qcid}
|
201
|
176
|
group by pss.useranswer
|
202
|
177
|
</select>
|
203
|
178
|
<!--主观题详情-->
|
|
@@ -208,13 +183,11 @@
|
208
|
183
|
,(select count(*) from t_paper_student ps where ps.paperid=qc.paperid and ps.classid=qc.classid)wtjnum
|
209
|
184
|
,(select group_concat(p.pointname separator ' ') from t_question_point qp
|
210
|
185
|
left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
|
211
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
212
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype!=2)a
|
213
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
214
|
|
- left join t_question q on qc.questionid=q.questionid
|
|
186
|
+ from t_question_class qc left join t_question q on qc.questionid=q.questionid
|
215
|
187
|
left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid
|
216
|
188
|
and qc.questionid=psq.questionid and (psq.answered=1 or psq.checked=1)
|
217
|
189
|
left join t_user u on psq.studentid=u.userid
|
|
190
|
+ where qc.qcid=#{question.qcid}
|
218
|
191
|
order by convert(u.username using gbk)
|
219
|
192
|
</select>
|
220
|
193
|
<!--答题卡主观题详情-->
|
|
@@ -222,27 +195,11 @@
|
222
|
195
|
select ps.psanswer qanswer,qc.qscore,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
|
223
|
196
|
,pss.stuscore,u.username stuname
|
224
|
197
|
,(select count(*) from t_paper_student ps where ps.paperid=qc.paperid and ps.classid=qc.classid)wtjnum
|
225
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
226
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype=2)a
|
227
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
228
|
|
- left join t_paper_scantron ps on qc.questionid=ps.pscaid
|
|
198
|
+ from t_question_class qc left join t_paper_scantron ps on qc.questionid=ps.pscaid
|
229
|
199
|
left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid and (pss.answered=1 or pss.checked=1)
|
230
|
|
- and pss.classid=#{question.classid}
|
231
|
|
- left join t_user u on pss.studentid=u.userid
|
232
|
|
- order by convert(u.username using gbk)
|
233
|
|
- </select>
|
234
|
|
- <!--考试主观题详情-->
|
235
|
|
- <select id="subjectiveEDetail" resultMap="questionResult">
|
236
|
|
- select ps.psanswer qanswer,qc.qscore,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
|
237
|
|
- ,pss.stuscore,u.username stuname
|
238
|
|
- ,(select count(*) from t_classroom_paper_student ps where ps.paperid=qc.paperid and ps.classid=qc.classid)wtjnum
|
239
|
|
- from (select max(qcid)qcid,questionid from t_question_class
|
240
|
|
- where questionid=#{question.questionid} and classid=#{question.classid} and qctype in(3,13,14,15))a
|
241
|
|
- left join t_question_class qc on a.qcid=qc.qcid
|
242
|
|
- left join t_classroom_paper_scantron ps on qc.questionid=ps.pscaid
|
243
|
|
- left join t_classroom_paper_student_scantron pss on ps.pscaid=pss.pscaid and (pss.answered=1 or pss.checked=1)
|
244
|
|
- and pss.classid=#{question.classid}
|
|
200
|
+ and pss.classid=qc.classid
|
245
|
201
|
left join t_user u on pss.studentid=u.userid
|
|
202
|
+ where qc.qcid=#{question.qcid}
|
246
|
203
|
order by convert(u.username using gbk)
|
247
|
204
|
</select>
|
248
|
205
|
|
|
@@ -275,4 +232,28 @@
|
275
|
232
|
FROM t_paper_file
|
276
|
233
|
WHERE paperid=#{paperid} ORDER BY fileorder asc
|
277
|
234
|
</select>
|
|
235
|
+ <!--复合题详情-->
|
|
236
|
+ <resultMap id="complexResult" type="com.xhkjedu.sstudy.vo.question.QuestionClassDetailVo">
|
|
237
|
+ <collection property="rates" select="listRate" column="{questionid=questionid,classid=classid}"></collection>
|
|
238
|
+ </resultMap>
|
|
239
|
+ <!--班级作业学生-->
|
|
240
|
+ <select id="listStus" resultType="java.util.Map">
|
|
241
|
+ select ps.studentid,u.username
|
|
242
|
+ from t_paper_student ps left join t_user u on ps.studentid = u.userid
|
|
243
|
+ where paperid=#{question.paperid} and classid=#{question.classid}
|
|
244
|
+ </select>
|
|
245
|
+ <!--班级作业学生作答情况-->
|
|
246
|
+ <select id="listStusAnswer" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperStudentQuestionVo">
|
|
247
|
+ select questionid,studentid,useranswer,stuscore,qscore
|
|
248
|
+ from t_paper_student_question
|
|
249
|
+ where paperid=#{question.paperid} and classid=#{question.classid} and questionpid=#{question.questionid}
|
|
250
|
+ </select>
|
|
251
|
+ <select id="complexDetail" resultMap="complexResult">
|
|
252
|
+ select qc.qscore,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.complexity
|
|
253
|
+ ,qc.qctype,qc.avgscore,qc.errorrate,qc.paperid,qc.classid,qc.questionid
|
|
254
|
+ ,(select group_concat(p.pointname separator ' ') from t_question_point qp
|
|
255
|
+ left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
|
|
256
|
+ from t_question_class qc left join t_question q on qc.questionid=q.questionid
|
|
257
|
+ where qc.qcid=#{question.qcid}
|
|
258
|
+ </select>
|
278
|
259
|
</mapper>
|