|
@@ -8,7 +8,7 @@
|
8
|
8
|
<!--监考设置列表-->
|
9
|
9
|
<select id="listSubject" resultType="java.util.Map">
|
10
|
10
|
select s.esid,s.subjectid,s.sdate,s.begintime,s.endtime,s.esstate,s.pstate,s.subjectname
|
11
|
|
- ,ifnull(ep.pnum,0)pnum,ifnull(ep.pscore,0)pscore,ep.correcttype
|
|
11
|
+ ,ifnull(ep.pnum,0) as pnum,ifnull(ep.pscore,0) as pscore,ep.correcttype
|
12
|
12
|
from e_subject s left join e_paper ep on s.esid = ep.esid
|
13
|
13
|
where s.examid=#{examid} group by s.esid
|
14
|
14
|
</select>
|
|
@@ -21,16 +21,16 @@
|
21
|
21
|
<!--教师监考-监控列表-->
|
22
|
22
|
<select id="listJkSubject" resultType="java.util.Map">
|
23
|
23
|
select es.*,count(eps.epsid)examnum
|
24
|
|
- ,count(case when eps.sstate in(0,3) then eps.epsid else null end) wjcnum
|
25
|
|
- ,count(case when eps.sstate in(1,2) then eps.epsid else null end)jcnum
|
26
|
|
- ,truncate(count(case when eps.sstate in(1,2) then eps.epsid else null end)*100/count(eps.epsid),2) jcrate
|
27
|
|
- ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
|
28
|
|
- ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
|
|
24
|
+ ,count(if(eps.sstate in(0,3), eps.epsid, null)) wjcnum
|
|
25
|
+ ,count(if(eps.sstate in(1,2), eps.epsid, null))jcnum
|
|
26
|
+ ,truncate(count(if(eps.sstate in(1,2), eps.epsid, null))*100/count(eps.epsid),2) jcrate
|
|
27
|
+ ,count(if(eps.sstate=2, eps.epsid, null))tjnum
|
|
28
|
+ ,count(if(eps.sstate=3, eps.epsid, null))qknum
|
29
|
29
|
from(select es.esid,es.sdate,es.begintime,es.endtime,es.esstate,es.subjectname,es.pstate
|
30
|
30
|
,eb.examname,eb.gradeid,eb.examtype,eb.examstate,eb.hashb,eb.schoolid,max(ei.majored)majored
|
31
|
|
- ,(case when max(ei.majored)=0 then group_concat(distinct ei.classid) else group_concat(distinct ec.classid) end)classids
|
|
31
|
+ ,(if(max(ei.majored)=0, group_concat(distinct ei.classid), group_concat(distinct ec.classid)))classids
|
32
|
32
|
,concat('[',group_concat(distinct json_object('classid',ec.classid,'classname',ec.classname
|
33
|
|
- ,'schoolid',ec.schoolid,'schoolname',s.schoolname)),']')classnames
|
|
33
|
+ ,'schoolid',ec.schoolid,'schoolname',s.schoolname)),']')classnames
|
34
|
34
|
from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
|
35
|
35
|
left join e_base eb on eb.examid = es.examid
|
36
|
36
|
left join e_class ec on eb.examid = ec.examid
|
|
@@ -48,7 +48,7 @@
|
48
|
48
|
<if test="esstate==2">
|
49
|
49
|
and es.pstate=2
|
50
|
50
|
</if>
|
51
|
|
- group by es.esid
|
|
51
|
+ group by es.esid having classids is not null
|
52
|
52
|
)es left join e_paper_student eps on es.esid = eps.esid and find_in_set(eps.classid,es.classids)
|
53
|
53
|
group by es.esid
|
54
|
54
|
<if test="esstate==1">
|