Browse Source

班级报告-单科概况-高频错题

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

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

94
         map.put("gzxsList", gzxsList);
94
         map.put("gzxsList", gzxsList);
95
         List<Map> gpctList = eRclassMapper.listGpCt(rank);//高频错题
95
         List<Map> gpctList = eRclassMapper.listGpCt(rank);//高频错题
96
         for (Map ct : gpctList) {
96
         for (Map ct : gpctList) {
97
-            //高频错误项
98
-            Integer ctype = (Integer) ct.get("ctype");
99
-            String gpcwx = "";
100
-            if (N_Utils.isObjectiveQuestion(ctype)) {
101
-                String answerjson = ct.get("answerjson").toString();//学生作答情况
102
-                String answer = JSON.parseArray(ct.get("answer").toString(), String.class).get(0);//正确答案
103
-                Map amap = JSON.parseObject(answerjson, Map.class);
104
-                List<Map<String, Integer>> list = new ArrayList<>();
105
-                Integer cwnum = 0;//作答错误学生数量
106
-                for (Object o : amap.keySet()) {
107
-                    List<Map> o1 = (List<Map>) amap.get(o);
108
-                    int answernum = o1.size();//作答学生数量
109
-                    String xx = o.toString();//选项
110
-                    if (!answer.equals(xx) && cwnum.compareTo(answernum) == -1) {
111
-                        cwnum = answernum;
112
-                        gpcwx = xx;
113
-                    }
114
-                }
115
-            }
116
-            ct.put("gpcwx", gpcwx);
117
-
118
             //知识点
97
             //知识点
119
             setQuestionPoint(ct);
98
             setQuestionPoint(ct);
120
 
99
 

+ 3
- 2
sexam/src/main/resources/mapper/report/ERclassMapper.xml View File

66
     </select>
66
     </select>
67
     <!--班级报告-单科概况-高频错题-->
67
     <!--班级报告-单科概况-高频错题-->
68
     <select id="listGpCt" resultType="java.util.Map">
68
     <select id="listGpCt" resultType="java.util.Map">
69
-        select erq.eptqid,erq.qn,erq.classsrate,erq.gradesrate,erq.answerjson
70
-        ,epq.eptname,epqq.ctype,epqq.answer,epa.pointjson
69
+        select erq.eptqid,erq.qn,erq.classsrate,erq.gradesrate,erq.answerjson,erq.erroroption
70
+        ,epq.eptname,epq.ctype,epqq.answer,epa.pointjson
71
         from e_rclass_question erq left join e_paper_qtype_question epqq on erq.epid = epqq.epid and erq.qorder=epqq.qorder
71
         from e_rclass_question erq left join e_paper_qtype_question epqq on erq.epid = epqq.epid and erq.qorder=epqq.qorder
72
         left join e_paper_qtype epq on epqq.eptid = epq.eptid
72
         left join e_paper_qtype epq on epqq.eptid = epq.eptid
73
         left join e_paper_analyze epa on erq.epid = epa.epid
73
         left join e_paper_analyze epa on erq.epid = epa.epid
74
         where erq.examid=#{rank.examid} and erq.classid=#{rank.classid}
74
         where erq.examid=#{rank.examid} and erq.classid=#{rank.classid}
75
         and erq.subjectid=#{rank.subjectid} and erq.classsrate&lt;40
75
         and erq.subjectid=#{rank.subjectid} and erq.classsrate&lt;40
76
+        group by erq.qorder
76
     </select>
77
     </select>
77
 </mapper>
78
 </mapper>

Loading…
Cancel
Save