|
@@ -5,8 +5,8 @@
|
5
|
5
|
<select id="listPending" resultType="java.util.Map">
|
6
|
6
|
select a.*,eb.examname,eb.gradeid,eb.examtype,es.sdate,es.begintime,es.endtime,es.subjectname
|
7
|
7
|
,truncate(a.pynum*100/a.tjnum,2)pgrate
|
8
|
|
- from(select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
9
|
|
- ,group_concat(distinct pq.qorder order by pq.qorder)qorders,group_concat(distinct pc.classid)classids
|
|
8
|
+ from(select p.esid,p.epid,group_concat(distinct pq.qn order by pq.eptqid)qns
|
|
9
|
+ ,group_concat(distinct pq.eptqid order by pq.eptqid)eptqids,group_concat(distinct pc.classid)classids
|
10
|
10
|
,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
|
11
|
11
|
,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
|
12
|
12
|
from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
|
|
@@ -14,8 +14,8 @@
|
14
|
14
|
left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
|
15
|
15
|
where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
|
16
|
16
|
union
|
17
|
|
- select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
18
|
|
- ,group_concat(distinct pq.qorder order by pq.qorder)qorders,0 classids
|
|
17
|
+ select p.esid,p.epid,group_concat(distinct pq.qn order by pq.eptqid)qns
|
|
18
|
+ ,group_concat(distinct pq.eptqid order by pq.eptqid)eptqids,0 classids
|
19
|
19
|
,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
|
20
|
20
|
,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
|
21
|
21
|
from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
|
|
@@ -28,8 +28,8 @@
|
28
|
28
|
<select id="listMarked" resultType="java.util.Map">
|
29
|
29
|
select a.*,eb.examname,eb.gradeid,eb.examtype,es.sdate,es.begintime,es.endtime,es.subjectname
|
30
|
30
|
,100 pgrate
|
31
|
|
- from(select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
32
|
|
- ,group_concat(distinct pq.qorder order by pq.qorder)qorders,group_concat(distinct pc.classid)classids
|
|
31
|
+ from(select p.esid,p.epid,group_concat(distinct pq.qn order by pq.eptqid)qns
|
|
32
|
+ ,group_concat(distinct pq.eptqid order by pq.eptqid)eptqids,group_concat(distinct pc.classid)classids
|
33
|
33
|
,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
|
34
|
34
|
,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
|
35
|
35
|
from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
|
|
@@ -37,8 +37,8 @@
|
37
|
37
|
left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
|
38
|
38
|
where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
|
39
|
39
|
union
|
40
|
|
- select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
41
|
|
- ,group_concat(distinct pq.qorder order by pq.qorder)qorders,0 classids
|
|
40
|
+ select p.esid,p.epid,group_concat(distinct pq.qn order by pq.eptqid)qns
|
|
41
|
+ ,group_concat(distinct pq.eptqid order by pq.eptqid)eptqids,0 classids
|
42
|
42
|
,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
|
43
|
43
|
,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
|
44
|
44
|
from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
|
|
@@ -49,8 +49,8 @@
|
49
|
49
|
</select>
|
50
|
50
|
<!--随机获取一条待批阅试题-->
|
51
|
51
|
<select id="getCorrectQuestion" resultType="com.xhkjedu.sexam.vo.paper.EPaperSQuestionVo">
|
52
|
|
- select psq.epsqid,psq.stuanswer,psq.qn,psq.qorder,psq.qscore,psq.epsid
|
53
|
|
- from e_paper_student_question psq where psq.epid=#{epid} and psq.qorder in(${qorders})
|
|
52
|
+ select psq.epsqid,psq.stuanswer,psq.qn,psq.eptqid,psq.qscore,psq.epsid
|
|
53
|
+ from e_paper_student_question psq where psq.eptqid in(${eptqids})
|
54
|
54
|
and psq.answered=1 and (psq.checked=0 or (psq.checked=1 and psq.checkid=#{teacherid}))
|
55
|
55
|
<if test="classids!=null and classids!=''">
|
56
|
56
|
and psq.classid in(${classids})
|
|
@@ -61,7 +61,7 @@
|
61
|
61
|
<select id="getCheckQuestion" resultType="com.xhkjedu.sexam.vo.paper.EPaperSQuestionVo">
|
62
|
62
|
select count(psq.epsqid)tjnum,count(case when psq.checked=2 then psq.epsqid else null end)pynum
|
63
|
63
|
,count(case when psq.checked=2 and psq.checkid=#{teacherid} then psq.epsqid else null end)wpynum
|
64
|
|
- from e_paper_student_question psq where psq.epid=#{epid} and psq.qorder=#{qorder} and psq.answered=1
|
|
64
|
+ from e_paper_student_question psq where psq.eptqid=#{eptqid} and psq.answered=1
|
65
|
65
|
</select>
|
66
|
66
|
<!--修改试卷学生试题为批阅中-->
|
67
|
67
|
<update id="updateCheckQuestionById">
|
|
@@ -75,8 +75,8 @@
|
75
|
75
|
</select>
|
76
|
76
|
<!--阅卷记录-->
|
77
|
77
|
<select id="listRecord" resultType="java.util.Map">
|
78
|
|
- select psq.epsqid,psq.stuanswer,psq.qorder,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.checktime
|
79
|
|
- from e_paper_student_question psq where psq.epid=#{epid} and psq.qorder=#{qorder}
|
|
78
|
+ select psq.epsqid,psq.stuanswer,psq.eptqid,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.checktime
|
|
79
|
+ from e_paper_student_question psq where psq.eptqid=#{eptqid}
|
80
|
80
|
and psq.checked=2 and psq.checkid=#{teacherid}
|
81
|
81
|
order by psq.checktime desc
|
82
|
82
|
</select>
|