|
@@ -25,55 +25,55 @@
|
25
|
25
|
</select>
|
26
|
26
|
<!--作业分析-->
|
27
|
27
|
<select id="getPaperAnalyze" resultType="java.util.Map">
|
28
|
|
- select p.paperid,p.papertype,p.papername,pa.pointjson,ifnull(ps.showanswer,0)showanswer,ps.psid
|
|
28
|
+ select p.paperid,p.papertype,p.papername,pa.pointjson,ifnull(ps.showanswer,0) as 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
|
32
|
32
|
where p.paperid=#{paperid} and ps.classid=#{classid} and ps.studentid=#{studentid}
|
33
|
33
|
</select>
|
34
|
34
|
<resultMap id="typeResult" type="java.util.Map">
|
35
|
|
- <result property="ptid" column="ptid"></result>
|
36
|
|
- <result property="ptorder" column="ptorder"></result>
|
37
|
|
- <result property="qtypename" column="qtypename"></result>
|
|
35
|
+ <result property="ptid" column="ptid"/>
|
|
36
|
+ <result property="ptorder" column="ptorder"/>
|
|
37
|
+ <result property="qtypename" column="qtypename"/>
|
38
|
38
|
<collection property="questions" ofType="java.util.Map" javaType="java.util.List">
|
39
|
|
- <result property="ptqid" column="ptqid"></result>
|
40
|
|
- <result property="qn" column="qn"></result>
|
41
|
|
- <result property="qorder" column="qorder"></result>
|
42
|
|
- <result property="qscore" column="qscore"></result>
|
43
|
|
- <result property="answerjson" column="answerjson"></result>
|
44
|
|
- <result property="ctype" column="ctype"></result>
|
45
|
|
- <result property="questionid" column="questionid"></result>
|
46
|
|
- <result property="classavgscore" column="classavgscore"></result>
|
47
|
|
- <result property="classscorerate" column="classscorerate"></result>
|
48
|
|
- <result property="stuscore" column="stuscore"></result>
|
49
|
|
- <result property="scorerate" column="scorerate"></result>
|
50
|
|
- <result property="answertype" column="answertype"></result>
|
51
|
|
- <result property="useranswer" column="useranswer"></result>
|
52
|
|
- <result property="converted" column="converted"></result>
|
53
|
|
- <result property="useranswertxt" column="useranswertxt"></result>
|
54
|
|
- <result property="good" column="good"></result>
|
55
|
|
- <result property="qstem" column="qstem"></result>
|
56
|
|
- <result property="qoption" column="qoption"></result>
|
57
|
|
- <result property="qanswer" column="qanswer"></result>
|
58
|
|
- <result property="qanalyze" column="qanalyze"></result>
|
59
|
|
- <result property="hashear" column="hashear"></result>
|
60
|
|
- <result property="hearfile" column="hearfile"></result>
|
61
|
|
- <result property="qlevel" column="qlevel"></result>
|
62
|
|
- <result property="optionnum" column="optionnum"></result>
|
63
|
|
- <result property="ptqid" column="ptqid"></result>
|
64
|
|
- <result property="checkcomm" column="checkcomm"></result>
|
65
|
|
- <result property="answered" column="answered"></result>
|
|
39
|
+ <result property="ptqid" column="ptqid"/>
|
|
40
|
+ <result property="qn" column="qn"/>
|
|
41
|
+ <result property="qorder" column="qorder"/>
|
|
42
|
+ <result property="qscore" column="qscore"/>
|
|
43
|
+ <result property="answerjson" column="answerjson"/>
|
|
44
|
+ <result property="ctype" column="ctype"/>
|
|
45
|
+ <result property="questionid" column="questionid"/>
|
|
46
|
+ <result property="classavgscore" column="classavgscore"/>
|
|
47
|
+ <result property="classscorerate" column="classscorerate"/>
|
|
48
|
+ <result property="stuscore" column="stuscore"/>
|
|
49
|
+ <result property="scorerate" column="scorerate"/>
|
|
50
|
+ <result property="answertype" column="answertype"/>
|
|
51
|
+ <result property="useranswer" column="useranswer"/>
|
|
52
|
+ <result property="converted" column="converted"/>
|
|
53
|
+ <result property="useranswertxt" column="useranswertxt"/>
|
|
54
|
+ <result property="good" column="good"/>
|
|
55
|
+ <result property="qstem" column="qstem"/>
|
|
56
|
+ <result property="qoption" column="qoption"/>
|
|
57
|
+ <result property="qanswer" column="qanswer"/>
|
|
58
|
+ <result property="qanalyze" column="qanalyze"/>
|
|
59
|
+ <result property="hashear" column="hashear"/>
|
|
60
|
+ <result property="hearfile" column="hearfile"/>
|
|
61
|
+ <result property="qlevel" column="qlevel"/>
|
|
62
|
+ <result property="optionnum" column="optionnum"/>
|
|
63
|
+ <result property="ptqid" column="ptqid"/>
|
|
64
|
+ <result property="checkcomm" column="checkcomm"/>
|
|
65
|
+ <result property="answered" column="answered"/>
|
66
|
66
|
</collection>
|
67
|
67
|
</resultMap>
|
68
|
68
|
<!--题库作业试题-->
|
69
|
69
|
<select id="listTkSt" resultMap="typeResult">
|
70
|
|
- select pq.qtypename,pq.ptid,pq.ptorder,psq.qorder,sum(psq.qscore)qscore,tq.ctype,
|
71
|
|
- (case when tq.qlevel=1 then pqq.qn else pqq.ptqorder end)qn,
|
72
|
|
- pqq.questionpid questionid,tq.qtypename qqtypename
|
|
70
|
+ select pq.qtypename,pq.ptid,pq.ptorder,psq.qorder,sum(psq.qscore) as qscore,tq.ctype,
|
|
71
|
+ (if(tq.qlevel=1, pqq.qn, pqq.ptqorder)) as qn,
|
|
72
|
+ pqq.questionpid as questionid,tq.qtypename qqtypename
|
73
|
73
|
<if test="showanswer==1">
|
74
|
|
- ,q.classavgscore,q.classscorerate,truncate(sum(psq.stuscore)*100/sum(psq.qscore),2)scorerate
|
75
|
|
- ,sum(psq.stuscore)stuscore,psq.good,tq.qanswer,tq.qanalyze
|
76
|
|
- ,(case when tq.qlevel=1 then psq.checkcomm else '' end)checkcomm
|
|
74
|
+ ,q.classavgscore,q.classscorerate,truncate(sum(psq.stuscore)*100/sum(psq.qscore),2) as scorerate
|
|
75
|
+ ,sum(psq.stuscore) as stuscore,psq.good,tq.qanswer,tq.qanalyze
|
|
76
|
+ ,(if(tq.qlevel=1, psq.checkcomm, '')) as checkcomm
|
77
|
77
|
</if>
|
78
|
78
|
,psq.answered,psq.answertype,psq.useranswer,psq.converted,psq.useranswertxt
|
79
|
79
|
,tq.qstem,tq.qoption,tq.hashear,tq.hearfile,tq.qlevel
|
|
@@ -87,8 +87,8 @@
|
87
|
87
|
</select>
|
88
|
88
|
<!--附件作业试题-->
|
89
|
89
|
<select id="listFjSt" resultMap="typeResult">
|
90
|
|
- select pq.qtypename,pq.psqtypeid ptid,pq.pstorder ptorder,ps.qn,ps.psorder qorder,ps.psscore qscore,ps.ctype,
|
91
|
|
- ps.optionnum,ps.pscaid ptqid,ps.qtypename qqtypename
|
|
90
|
+ select pq.qtypename,pq.psqtypeid as ptid,pq.pstorder as ptorder,ps.qn,ps.psorder as qorder
|
|
91
|
+ ,ps.psscore as qscore,ps.ctype,ps.optionnum,ps.pscaid as ptqid,ps.qtypename as qqtypename
|
92
|
92
|
<if test="showanswer==1">
|
93
|
93
|
,q.classavgscore,q.classscorerate,truncate(pss.stuscore*100/pss.qscore,2)scorerate
|
94
|
94
|
,pss.stuscore,pss.good,pss.checkcomm,ps.psanswer qanswer
|
|
@@ -106,7 +106,7 @@
|
106
|
106
|
select q.questionid,q.questionpid,q.qscore,q.qn
|
107
|
107
|
,q.answered,q.answertype,q.useranswer,q.converted,q.useranswertxt
|
108
|
108
|
<if test="showanswer==1">
|
109
|
|
- ,q.stuscore,q.good,ifnull(q.checkcomm,'')checkcomm,tq.qanswer,tq.qanalyze
|
|
109
|
+ ,q.stuscore,q.good,ifnull(q.checkcomm,'') as checkcomm,tq.qanswer,tq.qanalyze
|
110
|
110
|
</if>
|
111
|
111
|
,tq.sorder,tq.qstem,tq.qoption,tq.ctype,tq.qtypename
|
112
|
112
|
from t_question tq right join t_paper_student_question q on tq.questionid=q.questionid
|
|
@@ -116,28 +116,28 @@
|
116
|
116
|
</select>
|
117
|
117
|
<!--优秀作答-->
|
118
|
118
|
<resultMap id="answerResult" type="java.util.Map">
|
119
|
|
- <result property="ptid" column="ptid"></result>
|
120
|
|
- <result property="qorder" column="qorder"></result>
|
121
|
|
- <result property="qn" column="mqn"></result>
|
|
119
|
+ <result property="ptid" column="ptid"/>
|
|
120
|
+ <result property="qorder" column="qorder"/>
|
|
121
|
+ <result property="qn" column="mqn"/>
|
122
|
122
|
<collection property="students" ofType="java.util.Map" javaType="java.util.List">
|
123
|
|
- <result property="studentid" column="studentid"></result>
|
124
|
|
- <result property="username" column="username"></result>
|
125
|
|
- <result property="headpic" column="headpic"></result>
|
126
|
|
- <result property="qorder" column="qorder"></result>
|
127
|
|
- <result property="psid" column="psid"></result>
|
|
123
|
+ <result property="studentid" column="studentid"/>
|
|
124
|
+ <result property="username" column="username"/>
|
|
125
|
+ <result property="headpic" column="headpic"/>
|
|
126
|
+ <result property="qorder" column="qorder"/>
|
|
127
|
+ <result property="psid" column="psid"/>
|
128
|
128
|
<collection property="questions" ofType="java.util.Map" javaType="java.util.List">
|
129
|
|
- <result property="studentid" column="studentid"></result>
|
130
|
|
- <result property="qn" column="qn"></result>
|
131
|
|
- <result property="qorder" column="qorder"></result>
|
132
|
|
- <result property="psqid" column="psqid"></result>
|
133
|
|
- <result property="questionpid" column="questionpid"></result>
|
134
|
|
- <result property="stuscore" column="stuscore"></result>
|
135
|
|
- <result property="answertype" column="answertype"></result>
|
136
|
|
- <result property="useranswer" column="useranswer"></result>
|
137
|
|
- <result property="converted" column="converted"></result>
|
138
|
|
- <result property="useranswertxt" column="useranswertxt"></result>
|
139
|
|
- <result property="checkcomm" column="checkcomm"></result>
|
140
|
|
- <result property="checkid" column="checkid"></result>
|
|
129
|
+ <result property="studentid" column="studentid"/>
|
|
130
|
+ <result property="qn" column="qn"/>
|
|
131
|
+ <result property="qorder" column="qorder"/>
|
|
132
|
+ <result property="psqid" column="psqid"/>
|
|
133
|
+ <result property="questionpid" column="questionpid"/>
|
|
134
|
+ <result property="stuscore" column="stuscore"/>
|
|
135
|
+ <result property="answertype" column="answertype"/>
|
|
136
|
+ <result property="useranswer" column="useranswer"/>
|
|
137
|
+ <result property="converted" column="converted"/>
|
|
138
|
+ <result property="useranswertxt" column="useranswertxt"/>
|
|
139
|
+ <result property="checkcomm" column="checkcomm"/>
|
|
140
|
+ <result property="checkid" column="checkid"/>
|
141
|
141
|
</collection>
|
142
|
142
|
</collection>
|
143
|
143
|
</resultMap>
|
|
@@ -152,9 +152,9 @@
|
152
|
152
|
</select>
|
153
|
153
|
<!--作业基本信息-->
|
154
|
154
|
<select id="getPaper" resultType="java.util.Map">
|
155
|
|
- select p.papername,p.papertype,p.paperclass,p.createtime,p.hasfile,p.committype,p.timetype
|
|
155
|
+ select p.papername,p.papertype,p.paperclass,p.createtime,p.hasfile,p.hearfile,p.committype,p.timetype
|
156
|
156
|
,pg.starttime,pg.stoptime,pg.showtype,ps.papernum,ps.paperscore,ps.showanswer
|
157
|
|
- ,(case when ps.showanswer=1 then ps.userscore else 0 end)userscore
|
|
157
|
+ ,(if(ps.showanswer=1, ps.userscore, 0)) as userscore
|
158
|
158
|
from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
|
159
|
159
|
left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
|
160
|
160
|
where p.paperid=#{paperid} and pg.classid=#{classid} and ps.studentid=#{studentid}
|