Ver código fonte

Merge remote-tracking branch 'origin/ywx' into wn_j

tags/正式版本
王宁 2 anos atrás
pai
commit
a12f906cbd

+ 16
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/ESubjectInvigilateController.java Ver arquivo

@@ -180,4 +180,20 @@ public class ESubjectInvigilateController {
180 180
         PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
181 181
         return new ResultVo(0, "获取成功", pageResult);
182 182
     }
183
+
184
+    /**
185
+     * 扫描答题卡列表
186
+     *
187
+     * @return com.xhkjedu.vo.ResultVo
188
+     * @Param [subject]
189
+     * @Author ywx
190
+     * @Date 2022/8/11 11:28
191
+     **/
192
+    @PostMapping("/list_sm")
193
+    public ResultVo listScan(@RequestBody ESubject subject) {
194
+        Integer examid = subject.getExamid();
195
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
196
+        Map map = eSubjectInvigilateService.listScan(examid);
197
+        return new ResultVo(0, "获取成功", map);
198
+    }
183 199
 }

+ 5
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/ESubjectInvigilateMapper.java Ver arquivo

@@ -18,5 +18,9 @@ public interface ESubjectInvigilateMapper extends TkMapper<ESubjectInvigilate> {
18 18
     List<Map> listByEsId(@Param("esid") Integer esid);
19 19
 
20 20
     //教师监考-监控列表
21
-    List<Map> listJkSubject(@Param("examid") Integer examid, @Param("teacherid") Integer teacherid, @Param("esstate") Integer esstate);
21
+    List<Map> listJkSubject(@Param("examid") Integer examid, @Param("teacherid") Integer teacherid,
22
+                            @Param("esstate") Integer esstate);
23
+
24
+    //扫描答题卡列表
25
+    List<Map> listSSubject(@Param("examid") Integer examid);
22 26
 }

+ 8
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectInvigilateService.java Ver arquivo

@@ -73,4 +73,12 @@ public class ESubjectInvigilateService {
73 73
     public Map getESubjectByEsId(Integer esid) {
74 74
         return eSubjectMapper.getESubjectByEsId(esid);
75 75
     }
76
+
77
+    //扫描答题卡列表
78
+    public Map listScan(Integer examid) {
79
+        Map map = eBaseMapper.findById(examid);
80
+        List<Map> subjects = eSubjectInvigilateMapper.listSSubject(examid);//扫描答题卡列表
81
+        map.put("subjects", subjects);
82
+        return map;
83
+    }
76 84
 }

+ 15
- 0
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml Ver arquivo

@@ -55,4 +55,19 @@
55 55
             order by es.sdate desc,es.endtime desc
56 56
         </if>
57 57
     </select>
58
+    <!--扫描答题卡列表-->
59
+    <select id="listSSubject" resultType="java.util.Map">
60
+        select a.*,ifnull(truncate(a.smnum*100/a.examnum,2),0)smrate
61
+        ,ifnull(truncate(count(case when epsq.checked=1 then epsq.epsqid else null end)*100/count(epsq.epsqid),2),0)yjrate
62
+        from(select es.esid,es.esstate,es.subjectname
63
+        ,count(eps.epid)examnum,ep.epid
64
+        ,count(case when eps.sstate!=0 then eps.epsid else null end)smnum
65
+        ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
66
+        from e_subject es left join e_paper ep on es.esid = ep.esid
67
+        left join e_paper_student eps on ep.epid = eps.epid
68
+        where es.examid=#{examid}
69
+        group by es.esid)a left join e_paper_qtype_question epqq on a.epid = epqq.epid and epqq.ctype in(3,13,14,15)
70
+        left join e_paper_student_question epsq on epsq.eptqid = epqq.eptqid and epsq.answered=1
71
+        group by a.epid
72
+    </select>
58 73
 </mapper>

+ 2
- 2
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml Ver arquivo

@@ -12,7 +12,7 @@
12 12
         from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
13 13
         left join e_paper_correctclass pc on p.epid = pc.epid
14 14
         left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
15
-        where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
15
+        where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
16 16
         union
17 17
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
18 18
         ,0 classids
@@ -35,7 +35,7 @@
35 35
         from e_paper p left join e_paper_qtype_question pq on p.epid = pq.epid
36 36
         left join e_paper_correctclass pc on p.epid = pc.epid
37 37
         left join e_paper_student_question psq on psq.epid = pc.epid and psq.classid=pc.classid and psq.qorder=pq.qorder
38
-        where pc.teacherid=#{teacherid} and pq.ctype in(3,14,15) group by p.epid
38
+        where pc.teacherid=#{teacherid} and pq.ctype in(3,13,14,15) group by p.epid
39 39
         union
40 40
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
41 41
         ,0 classids

Carregando…
Cancelar
Salvar