|
@@ -6,13 +6,13 @@
|
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
|
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(pc.classid)classids
|
|
9
|
+ ,group_concat(distinct pq.qorder order by pq.qorder)qorders,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
|
13
|
13
|
left join e_paper_correctclass pc on p.epid = pc.epid
|
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
|
|
- where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15)
|
|
15
|
+ where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
|
16
|
16
|
union
|
17
|
17
|
select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
18
|
18
|
,group_concat(distinct pq.qorder order by pq.qorder)qorders,0 classids
|
|
@@ -20,7 +20,7 @@
|
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
|
22
|
22
|
left join e_paper_student_question psq on psq.epid = pq.epid and psq.qorder=pq.qorder
|
23
|
|
- where pq.teacherid=#{teacherid})a left join e_subject es on a.esid = es.esid
|
|
23
|
+ where pq.teacherid=#{teacherid} group by p.epid)a left join e_subject es on a.esid = es.esid
|
24
|
24
|
left join e_base eb on es.examid = eb.examid
|
25
|
25
|
where a.tjnum!=a.pynum group by a.epid
|
26
|
26
|
</select>
|
|
@@ -28,15 +28,15 @@
|
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
|
from(select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
31
|
|
- ,group_concat(distinct pq.qorder order by pq.qorder)qorders,group_concat(pc.classid)classids
|
|
31
|
+ ,group_concat(distinct pq.qorder order by pq.qorder)qorders,group_concat(distinct pc.classid)classids
|
32
|
32
|
from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
|
33
|
33
|
left join e_paper_correctclass pc on p.epid = pc.epid
|
34
|
|
- where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15)
|
|
34
|
+ where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
|
35
|
35
|
union
|
36
|
36
|
select p.esid,p.epid,group_concat(distinct pq.qn order by pq.qorder)qns
|
37
|
37
|
,group_concat(distinct pq.qorder order by pq.qorder)qorders,0 classids
|
38
|
38
|
from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
|
39
|
|
- where pq.teacherid=#{teacherid})a left join e_subject es on a.esid = es.esid
|
|
39
|
+ where pq.teacherid=#{teacherid} group by p.epid)a left join e_subject es on a.esid = es.esid
|
40
|
40
|
left join e_base eb on es.examid = eb.examid
|
41
|
41
|
left join e_paper_student ps on a.epid=ps.epid
|
42
|
42
|
group by a.epid
|