Browse Source

教师阅卷 发布考试

tags/正式版本
雍文秀 2 years ago
parent
commit
7849a29933

+ 2
- 1
sexam/src/main/resources/mapper/exam/EBaseMapper.xml View File

@@ -62,7 +62,8 @@
62 62
     <!--根据考试id获取考试状态-->
63 63
     <select id="getExamStateById" resultType="com.xhkjedu.sexam.vo.exam.EBaseVo">
64 64
         select eb.examid,eb.examname,eb.gradeid,eb.examstate,eb.schoolid,eb.exammode
65
-        ,count(case when es.esstate!=1 then es.esid else null end)wwcnum,min(ep.answered)answered
65
+        ,count(case when es.esstate!=1 then es.esid else null end)wwcnum
66
+        ,(case when eb.exammode=1 then min(ep.answered) else 0 end)answered
66 67
         ,min(ifnull(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime)),0))begintime
67 68
         from e_base eb left join e_subject es on eb.examid = es.examid
68 69
         left join e_paper ep on es.esid = ep.esid

+ 8
- 10
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml View File

@@ -5,14 +5,13 @@
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 concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
8
+        from(select p.esid,p.epid,group_concat(distinct concat(psq.qn,'_',psq.eptqid) order by psq.eptqid)qns
9 9
         ,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
-        from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
13
-        left join e_paper_correctclass pc on p.epid = pc.epid
14
-        left join e_paper_student_question psq on psq.classid=pc.classid and psq.eptqid=pq.eptqid
15
-        where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
12
+        from e_paper p left join e_paper_correctclass pc on p.epid = pc.epid
13
+        left join e_paper_student_question psq on psq.classid=pc.classid and psq.epid=p.epid
14
+        where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
16 15
         union
17 16
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
18 17
         ,0 classids
@@ -28,14 +27,13 @@
28 27
     <select id="listMarked" resultType="java.util.Map">
29 28
         select a.*,eb.examname,eb.gradeid,eb.examtype,es.sdate,es.begintime,es.endtime,es.subjectname
30 29
         ,100 pgrate
31
-        from(select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
30
+        from(select p.esid,p.epid,group_concat(distinct concat(psq.qn,'_',psq.eptqid) order by psq.eptqid)qns
32 31
         ,group_concat(distinct pc.classid)classids
33 32
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
34 33
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
35
-        from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
36
-        left join e_paper_correctclass pc on p.epid = pc.epid
37
-        left join e_paper_student_question psq on psq.classid=pc.classid and psq.eptqid=pq.eptqid
38
-        where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
34
+        from e_paper p left join e_paper_correctclass pc on p.epid = pc.epid
35
+        left join e_paper_student_question psq on psq.classid=pc.classid and psq.epid=p.epid
36
+        where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
39 37
         union
40 38
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
41 39
         ,0 classids

Loading…
Cancel
Save