Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式版本
王宁 2 years ago
parent
commit
a9cd818186
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      sexam/src/main/resources/mapper/exam/ESubjectMapper.xml

+ 5
- 4
sexam/src/main/resources/mapper/exam/ESubjectMapper.xml View File

33
         select es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.esstate
33
         select es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.esstate
34
         ,ep.correcttype,es.esid,ep.epid,ep.ptype
34
         ,ep.correcttype,es.esid,ep.epid,ep.ptype
35
         ,(select count(*) from e_subject_invigilate ei where ei.esid=es.esid)jkjsnum
35
         ,(select count(*) from e_subject_invigilate ei where ei.esid=es.esid)jkjsnum
36
-        ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
37
-        ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
38
-        ,ifnull(truncate(count(case when eps.checked=2 then eps.epsid else null end)*100/
39
-        count(case when eps.sstate=2 then eps.epsid else null end),0),0)pyrate
36
+        ,count(distinct case when eps.sstate=3 then eps.epsid else null end)qknum
37
+        ,count(distinct case when eps.sstate=2 then eps.epsid else null end)tjnum
38
+        ,ifnull(truncate(count(case when psq.answered=1 AND psq.checked=2 then psq.epsqid else null end)*100/
39
+                         count(case when psq.answered=1 then psq.epsqid else null end),2),0)pyrate
40
         from e_subject es left join e_paper ep on es.esid = ep.esid
40
         from e_subject es left join e_paper ep on es.esid = ep.esid
41
         left join e_paper_student eps on ep.epid = eps.epid
41
         left join e_paper_student eps on ep.epid = eps.epid
42
+        left join e_paper_student_question psq on psq.epid=ep.epid and psq.ctype in(3,13,14,15)
42
         where es.examid=#{examid}
43
         where es.examid=#{examid}
43
         group by es.esid
44
         group by es.esid
44
     </select>
45
     </select>

Loading…
Cancel
Save