Browse Source

完善试题统计

tags/正式版本
王宁 2 years ago
parent
commit
f626aea1f1

+ 0
- 7
sexam/src/main/java/com/xhkjedu/sexam/mapper/reportclass/ERclassQuestionErrorMapper.java View File

1
-package com.xhkjedu.sexam.mapper.reportclass;
2
-
3
-import com.xhkjedu.sexam.base.TkMapper;
4
-import com.xhkjedu.sexam.model.reportclass.ERclassQuestionError;
5
-
6
-public interface ERclassQuestionErrorMapper extends TkMapper<ERclassQuestionError> {
7
-}

+ 0
- 42
sexam/src/main/java/com/xhkjedu/sexam/model/reportclass/ERclassQuestionError.java View File

1
-package com.xhkjedu.sexam.model.reportclass;
2
-
3
-import com.xhkjedu.sexam.model.BaseBean;
4
-import lombok.Data;
5
-
6
-import javax.persistence.Id;
7
-import javax.persistence.Table;
8
-
9
-@Table(name = "e_rclass_question_error")
10
-@Data
11
-public class ERclassQuestionError extends BaseBean {
12
-    @Id
13
-    //考试报告班级单科高频错题表
14
-    private Integer rceqid;
15
-
16
-    //考试id
17
-    private Integer examid;
18
-
19
-    //班级id
20
-    private Integer classid;
21
-
22
-    //科目id
23
-    private String subjectid;
24
-
25
-    //题号
26
-    private String qn;
27
-
28
-    //题型名称
29
-    private String qtypename;
30
-
31
-    //知识点
32
-    private String pointname;
33
-
34
-    //班级得分率
35
-    private Double classrate;
36
-
37
-    //年级得分率
38
-    private Double graderate;
39
-
40
-    //高频错误项
41
-    private String errormsg;
42
-}

+ 25
- 7
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

2
 
2
 
3
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
 import com.xhkjedu.sexam.mapper.exam.EClassMapper;
4
 import com.xhkjedu.sexam.mapper.exam.EClassMapper;
5
+import com.xhkjedu.sexam.mapper.paper.EPaperAnalyzeMapper;
5
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
6
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
6
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
7
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
7
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
8
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
10
 import com.xhkjedu.sexam.mapper.report.ERsubjectMapper;
11
 import com.xhkjedu.sexam.mapper.report.ERsubjectMapper;
11
 import com.xhkjedu.sexam.mapper.reportclass.ERclassMapper;
12
 import com.xhkjedu.sexam.mapper.reportclass.ERclassMapper;
12
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQtypeMapper;
13
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQtypeMapper;
13
-import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionErrorMapper;
14
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionMapper;
14
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionMapper;
15
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionPointMapper;
15
 import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionPointMapper;
16
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
16
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
17
+import com.xhkjedu.sexam.model.paper.EPaperAnalyze;
17
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
18
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
18
 import com.xhkjedu.sexam.model.report.ERbase;
19
 import com.xhkjedu.sexam.model.report.ERbase;
19
 import com.xhkjedu.sexam.model.report.ERsubject;
20
 import com.xhkjedu.sexam.model.report.ERsubject;
20
 import com.xhkjedu.sexam.model.reportclass.ERclass;
21
 import com.xhkjedu.sexam.model.reportclass.ERclass;
21
 import com.xhkjedu.sexam.model.reportclass.ERclassQtype;
22
 import com.xhkjedu.sexam.model.reportclass.ERclassQtype;
22
 import com.xhkjedu.sexam.model.reportclass.ERclassQuestion;
23
 import com.xhkjedu.sexam.model.reportclass.ERclassQuestion;
23
-import com.xhkjedu.sexam.model.reportclass.ERclassQuestionError;
24
 import com.xhkjedu.sexam.model.reportclass.ERclassQuestionPoint;
24
 import com.xhkjedu.sexam.model.reportclass.ERclassQuestionPoint;
25
 import com.xhkjedu.sexam.model.reportstu.ERstudent;
25
 import com.xhkjedu.sexam.model.reportstu.ERstudent;
26
 import com.xhkjedu.sexam.utils.ExamUtil;
26
 import com.xhkjedu.sexam.utils.ExamUtil;
56
     private EPaperQtypeMapper ePaperQtypeMapper;
56
     private EPaperQtypeMapper ePaperQtypeMapper;
57
     @Resource
57
     @Resource
58
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
58
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
59
-
59
+    @Resource
60
+    private EPaperAnalyzeMapper ePaperAnalyzeMapper;
60
 
61
 
61
     @Resource
62
     @Resource
62
     private ERbaseMapper eRbaseMapper;
63
     private ERbaseMapper eRbaseMapper;
72
     private ERclassQuestionMapper eRclassQuestionMapper;
73
     private ERclassQuestionMapper eRclassQuestionMapper;
73
     @Resource
74
     @Resource
74
     private ERclassQuestionPointMapper eRclassQuestionPointMapper;
75
     private ERclassQuestionPointMapper eRclassQuestionPointMapper;
75
-    @Resource
76
-    private ERclassQuestionErrorMapper eRclassQuestionErrorMapper;
77
 
76
 
78
 
77
 
79
     //生成考试报告
78
     //生成考试报告
161
         List<ERclass> classList = new ArrayList<>();//考试报告班级情况
160
         List<ERclass> classList = new ArrayList<>();//考试报告班级情况
162
         List<ERclassQtype> qtypeList = new ArrayList<>();//考试报告班级题型情况
161
         List<ERclassQtype> qtypeList = new ArrayList<>();//考试报告班级题型情况
163
         List<ERclassQuestion> questionList = new ArrayList<>();//考试报告班级试题情况
162
         List<ERclassQuestion> questionList = new ArrayList<>();//考试报告班级试题情况
164
-        List<ERclassQuestionError> errorList = new ArrayList<>();//考试报告班级高频错题情况
165
         List<ERclassQuestionPoint> pointList = new ArrayList<>();//考试报告班级试题知识点情况
163
         List<ERclassQuestionPoint> pointList = new ArrayList<>();//考试报告班级试题知识点情况
166
         for (Map.Entry<String, List<ERstudent>> ssEntry : subCollect.entrySet()) {
164
         for (Map.Entry<String, List<ERstudent>> ssEntry : subCollect.entrySet()) {
167
             subjectid = ssEntry.getKey();
165
             subjectid = ssEntry.getKey();
336
         }
334
         }
337
     }
335
     }
338
 
336
 
339
-    //题型试题
337
+    //试卷题型试题、知识点
340
     private void setClassQuestion(Integer examid,List<Map> subjects,List<Map> classes){
338
     private void setClassQuestion(Integer examid,List<Map> subjects,List<Map> classes){
341
         //考试所有学生提交试卷情况
339
         //考试所有学生提交试卷情况
342
         List<EPaperStudentQuestion> stulist = ePaperStudentQuestionMapper.listExamStudentsAnswer(examid);
340
         List<EPaperStudentQuestion> stulist = ePaperStudentQuestionMapper.listExamStudentsAnswer(examid);
462
                     rtypelist.add(eRclassQtype);
460
                     rtypelist.add(eRclassQtype);
463
                 }
461
                 }
464
             }
462
             }
463
+
464
+            if(ptype == 1){
465
+                //获取试卷只是分析
466
+                Map epa = ePaperAnalyzeMapper.getPaperAnalzyeByEpid(epid);
467
+                String pointjson = epa.get("pointjson").toString();
468
+                List<Map> pointlist = JSON.parseArray(pointjson,Map.class);
469
+                //遍历知识点处理年级班级知识点情况
470
+                for(int j=0;j<pointlist.size();j++){
471
+                    Map pointmap = pointlist.get(j);
472
+                    String pointname = pointmap.get("pointname").toString();
473
+                    Double score = Double.parseDouble(pointmap.get("score").toString());
474
+                    Double scorerate = Double.parseDouble(pointmap.get("scorerate").toString());
475
+                    String order = pointmap.get("order").toString();
476
+
477
+                
478
+                }
479
+
480
+            }
481
+
482
+
465
         }
483
         }
466
         eRclassQtypeMapper.insertList(rtypelist);
484
         eRclassQtypeMapper.insertList(rtypelist);
467
         eRclassQuestionMapper.insertList(rqlist);
485
         eRclassQuestionMapper.insertList(rqlist);

Loading…
Cancel
Save