Browse Source

教师阅卷

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

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

11
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
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
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
13
         left join e_paper_correctclass pc on p.epid = pc.epid
14
-        left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
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
15
         where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
16
         union
16
         union
17
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
17
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
19
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
19
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
20
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
20
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
21
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
21
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
22
-        left join e_paper_student_question psq on psq.epid = pq.epid and psq.qorder=pq.qorder
22
+        left join e_paper_student_question psq on psq.eptqid=pq.eptqid
23
         where pq.teacherid=#{teacherid} group by p.epid)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
         left join e_base eb on es.examid = eb.examid
24
         left join e_base eb on es.examid = eb.examid
25
         where a.tjnum!=a.pynum
25
         where a.tjnum!=a.pynum
34
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
34
         ,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
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
36
         left join e_paper_correctclass pc on p.epid = pc.epid
37
-        left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
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
38
         where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
39
         union
39
         union
40
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
40
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
42
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
42
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
43
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
43
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
44
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
44
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
45
-        left join e_paper_student_question psq on psq.epid = pq.epid and psq.qorder=pq.qorder
45
+        left join e_paper_student_question psq on psq.eptqid=pq.eptqid
46
         where pq.teacherid=#{teacherid} group by p.epid)a left join e_subject es on a.esid = es.esid
46
         where pq.teacherid=#{teacherid} group by p.epid)a left join e_subject es on a.esid = es.esid
47
         left join e_base eb on es.examid = eb.examid
47
         left join e_base eb on es.examid = eb.examid
48
         where a.tjnum>0 and a.tjnum=a.pynum
48
         where a.tjnum>0 and a.tjnum=a.pynum

Loading…
Cancel
Save