Преглед изворни кода

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

tags/正式版本
王宁 пре 2 година
родитељ
комит
a9cd818186
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5
    4
      sexam/src/main/resources/mapper/exam/ESubjectMapper.xml

+ 5
- 4
sexam/src/main/resources/mapper/exam/ESubjectMapper.xml Прегледај датотеку

@@ -33,12 +33,13 @@
33 33
         select es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.esstate
34 34
         ,ep.correcttype,es.esid,ep.epid,ep.ptype
35 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 40
         from e_subject es left join e_paper ep on es.esid = ep.esid
41 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 43
         where es.examid=#{examid}
43 44
         group by es.esid
44 45
     </select>

Loading…
Откажи
Сачувај