|
@@ -25,7 +25,7 @@
|
25
|
25
|
</select>
|
26
|
26
|
<!--作业分析-->
|
27
|
27
|
<select id="getPaperAnalyze" resultType="java.util.Map">
|
28
|
|
- select p.paperid,p.papertype,p.papername,pa.pointjson,ps.showanswer,ps.psid
|
|
28
|
+ select p.paperid,p.papertype,p.papername,pa.pointjson,ifnull(ps.showanswer,0)showanswer,ps.psid
|
29
|
29
|
,(select pc.showtype from t_paper_class pc where pc.paperid=ps.paperid and pc.classid=ps.classid)showtype
|
30
|
30
|
from t_paper p left join t_paper_analyze pa on p.paperid = pa.paperid
|
31
|
31
|
left join t_paper_student ps on p.paperid = ps.paperid
|
|
@@ -69,10 +69,13 @@
|
69
|
69
|
<select id="listTkSt" resultMap="typeResult">
|
70
|
70
|
select pq.qtypename,pq.ptid,pq.ptorder,pqq.qn,psq.qorder,sum(psq.qscore)qscore,tq.ctype,
|
71
|
71
|
pqq.questionpid questionid,tq.qtypename qqtypename
|
72
|
|
- ,q.classavgscore,q.classscorerate,truncate(sum(psq.stuscore)*100/sum(psq.qscore),2)scorerate
|
73
|
|
- ,sum(psq.stuscore)stuscore,psq.answertype,psq.useranswer,psq.converted,psq.useranswertxt,psq.good
|
74
|
|
- ,(case when tq.qlevel=1 then psq.checkcomm else '' end)checkcomm,psq.answered
|
75
|
|
- ,tq.qstem,tq.qoption,tq.qanswer,tq.qanalyze,tq.hashear,tq.hearfile,tq.qlevel
|
|
72
|
+ <if test="showanswer==1">
|
|
73
|
+ ,q.classavgscore,q.classscorerate,truncate(sum(psq.stuscore)*100/sum(psq.qscore),2)scorerate
|
|
74
|
+ ,sum(psq.stuscore)stuscore,psq.good,tq.qanswer,tq.qanalyze
|
|
75
|
+ ,(case when tq.qlevel=1 then psq.checkcomm else '' end)checkcomm
|
|
76
|
+ </if>
|
|
77
|
+ ,psq.answered,psq.answertype,psq.useranswer,psq.converted,psq.useranswertxt
|
|
78
|
+ ,tq.qstem,tq.qoption,tq.hashear,tq.hearfile,tq.qlevel
|
76
|
79
|
from t_paper_qtype_question pqq left join t_paper_qtype pq on pqq.ptid=pq.ptid
|
77
|
80
|
left join t_paper_student_question psq on pqq.paperid=psq.paperid
|
78
|
81
|
and psq.classid=#{classid} and psq.studentid=#{studentid} and pqq.questionid=psq.questionid
|
|
@@ -84,10 +87,12 @@
|
84
|
87
|
<!--附件作业试题-->
|
85
|
88
|
<select id="listFjSt" resultMap="typeResult">
|
86
|
89
|
select pq.qtypename,pq.psqtypeid ptid,pq.pstorder ptorder,ps.qn,ps.psorder qorder,ps.psscore qscore,ps.ctype,
|
87
|
|
- ps.psanswer qanswer,ps.optionnum,ps.pscaid ptqid,ps.qtypename qqtypename,
|
88
|
|
- q.classavgscore,q.classscorerate,truncate(pss.stuscore*100/pss.qscore,2)scorerate
|
89
|
|
- ,pss.stuscore,pss.answertype,pss.useranswer,pss.converted,pss.useranswertxt,pss.good
|
90
|
|
- ,pss.checkcomm,pss.answered
|
|
90
|
+ ps.optionnum,ps.pscaid ptqid,ps.qtypename qqtypename
|
|
91
|
+ <if test="showanswer==1">
|
|
92
|
+ ,q.classavgscore,q.classscorerate,truncate(pss.stuscore*100/pss.qscore,2)scorerate
|
|
93
|
+ ,pss.stuscore,pss.good,pss.checkcomm,ps.psanswer qanswer
|
|
94
|
+ </if>
|
|
95
|
+ ,pss.answered,pss.answertype,pss.useranswer,pss.converted,pss.useranswertxt
|
91
|
96
|
from t_paper_scantron ps left join t_paper_student_scantron pss on ps.pscaid=pss.pscaid
|
92
|
97
|
left join t_paper_scantron_qtype pq on ps.psqtypeid=pq.psqtypeid
|
93
|
98
|
left join t_paper_rclass_question q
|
|
@@ -98,9 +103,11 @@
|
98
|
103
|
<!--题库作业子题-->
|
99
|
104
|
<select id="listZtQuestion" resultType="java.util.Map">
|
100
|
105
|
select q.questionid,q.questionpid,q.qscore,q.qn
|
101
|
|
- ,q.stuscore,q.answertype,q.useranswer,q.converted,q.useranswertxt,q.good
|
102
|
|
- ,ifnull(q.checkcomm,'')checkcomm,q.answered
|
103
|
|
- ,tq.sorder,tq.qstem,tq.qoption,tq.qanswer,tq.qanalyze,tq.ctype,tq.qtypename
|
|
106
|
+ ,q.answered,q.answertype,q.useranswer,q.converted,q.useranswertxt
|
|
107
|
+ <if test="showanswer==1">
|
|
108
|
+ ,q.stuscore,q.good,ifnull(q.checkcomm,'')checkcomm,tq.qanswer,tq.qanalyze
|
|
109
|
+ </if>
|
|
110
|
+ ,tq.sorder,tq.qstem,tq.qoption,tq.ctype,tq.qtypename
|
104
|
111
|
from t_question tq right join t_paper_student_question q on tq.questionid=q.questionid
|
105
|
112
|
where q.psid=#{psid} and tq.questionpid in
|
106
|
113
|
<foreach collection="questionids" item="questionid" open="(" separator="," close=")">#{questionid}</foreach>
|