Kaynağa Gözat

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

考试监控列表返回考试状态
tags/正式3.7.0
雍文秀 2 yıl önce
ebeveyn
işleme
9338748149

+ 10
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java Dosyayı Görüntüle

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

+ 1
- 1
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml Dosyayı Görüntüle

@@ -26,7 +26,7 @@
26 26
         ,truncate(count(case when eps.sstate in(1,2) then eps.epsid else null end)*100/count(eps.epsid),2) jcrate
27 27
         ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
28 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 30
         ,eb.examname,eb.gradeid,eb.examtype,eb.examstate,max(ei.majored)majored
31 31
         ,(case when max(ei.majored)=0 then group_concat(distinct ei.classid) else group_concat(distinct ec.classid) end)classids
32 32
         ,concat('[',group_concat(distinct json_object('classid',ec.classid,'classname',ec.classname)),']')classnames

+ 4
- 4
sexam/src/main/resources/mapper/report/EReportGenerateMapper.xml Dosyayı Görüntüle

@@ -44,17 +44,17 @@
44 44
     </select>
45 45
     <!--学生优秀试卷-->
46 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 48
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
49 49
         where examid=#{examid} and good=1
50
-        group by studentid, subjectid, good
50
+        group by studentid, subjectid
51 51
     </select>
52 52
     <!--学生违规试卷-->
53 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 55
         from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
56 56
         where examid=#{examid} and bad=1
57
-        group by studentid, subjectid, bad
57
+        group by studentid, subjectid
58 58
     </select>
59 59
     <!--获取试卷分数-->
60 60
     <select id="getScoreByExamAndSubjectId" resultType="java.lang.Double">

Loading…
İptal
Kaydet