Browse Source

考试报告学生优秀/违纪试卷分析 复合题下多个优秀/违纪试题算一个

考试监控列表返回考试状态
tags/正式3.7.0
雍文秀 2 years ago
parent
commit
9338748149

+ 10
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java View File

276
                         List<Map> ztList = questionList.stream().filter(
276
                         List<Map> ztList = questionList.stream().filter(
277
                                 tq -> questionpid.equals(tq.get("questionpid"))).collect(Collectors.toList());
277
                                 tq -> questionpid.equals(tq.get("questionpid"))).collect(Collectors.toList());
278
                         List<Map> sonques = new ArrayList<>();
278
                         List<Map> sonques = new ArrayList<>();
279
+                        Integer good = 0;//优秀试卷0默认1优秀
280
+                        Integer bad = 0;//违纪试卷0默认1违纪
279
                         for (Map q2 : ztList) {
281
                         for (Map q2 : ztList) {
280
                             Map zt = new HashMap();
282
                             Map zt = new HashMap();
281
                             zt.put("ctype", q2.get("ctype"));
283
                             zt.put("ctype", q2.get("ctype"));
295
                             zt.put("answered", q2.get("answered"));
297
                             zt.put("answered", q2.get("answered"));
296
                             zt.put("good", q2.get("good"));
298
                             zt.put("good", q2.get("good"));
297
                             zt.put("bad", q2.get("bad"));
299
                             zt.put("bad", q2.get("bad"));
300
+                            if (q2.get("good").equals(1)) {
301
+                                good = 1;
302
+                            }
303
+                            if (q2.get("bad").equals(1)) {
304
+                                bad = 1;
305
+                            }
298
                             sonques.add(zt);
306
                             sonques.add(zt);
299
                         }
307
                         }
308
+                        qmap.put("good", good);
309
+                        qmap.put("bad", bad);
300
                         qmap.put("qscore", mqscore);
310
                         qmap.put("qscore", mqscore);
301
                         qmap.put("sonques", sonques);
311
                         qmap.put("sonques", sonques);
302
                     } else {//简单题
312
                     } else {//简单题

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

26
         ,truncate(count(case when eps.sstate in(1,2) then eps.epsid else null end)*100/count(eps.epsid),2) jcrate
26
         ,truncate(count(case when eps.sstate in(1,2) then eps.epsid else null end)*100/count(eps.epsid),2) jcrate
27
         ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
27
         ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
28
         ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
28
         ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
29
-        from(select es.esid,es.sdate,es.begintime,es.endtime,es.esstate,es.subjectname
29
+        from(select es.esid,es.sdate,es.begintime,es.endtime,es.esstate,es.subjectname,es.pstate
30
         ,eb.examname,eb.gradeid,eb.examtype,eb.examstate,max(ei.majored)majored
30
         ,eb.examname,eb.gradeid,eb.examtype,eb.examstate,max(ei.majored)majored
31
         ,(case when max(ei.majored)=0 then group_concat(distinct ei.classid) else group_concat(distinct ec.classid) end)classids
31
         ,(case when max(ei.majored)=0 then group_concat(distinct ei.classid) else group_concat(distinct ec.classid) end)classids
32
         ,concat('[',group_concat(distinct json_object('classid',ec.classid,'classname',ec.classname)),']')classnames
32
         ,concat('[',group_concat(distinct json_object('classid',ec.classid,'classname',ec.classname)),']')classnames

+ 4
- 4
sexam/src/main/resources/mapper/report/EReportGenerateMapper.xml View File

44
     </select>
44
     </select>
45
     <!--学生优秀试卷-->
45
     <!--学生优秀试卷-->
46
     <select id="listGoodActionByExamId" resultType="java.util.Map">
46
     <select id="listGoodActionByExamId" resultType="java.util.Map">
47
-        select studentid,classid,epsq.subjectid,s.subjectname,count(epsq.epsqid)num
47
+        select studentid,classid,epsq.subjectid,s.subjectname,count(distinct epsq.qorder)num
48
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
48
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
49
         where examid=#{examid} and good=1
49
         where examid=#{examid} and good=1
50
-        group by studentid, subjectid, good
50
+        group by studentid, subjectid
51
     </select>
51
     </select>
52
     <!--学生违规试卷-->
52
     <!--学生违规试卷-->
53
     <select id="listBadQuesActionByExamId" resultType="java.util.Map">
53
     <select id="listBadQuesActionByExamId" resultType="java.util.Map">
54
-        select studentid,classid,epsq.subjectid,s.subjectname,count(epsq.epsqid)num
54
+        select studentid,classid,epsq.subjectid,s.subjectname,count(distinct epsq.qorder)num
55
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
55
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
56
         where examid=#{examid} and bad=1
56
         where examid=#{examid} and bad=1
57
-        group by studentid, subjectid, bad
57
+        group by studentid, subjectid
58
     </select>
58
     </select>
59
     <!--获取试卷分数-->
59
     <!--获取试卷分数-->
60
     <select id="getScoreByExamAndSubjectId" resultType="java.lang.Double">
60
     <select id="getScoreByExamAndSubjectId" resultType="java.lang.Double">

Loading…
Cancel
Save