|
@@ -2,6 +2,7 @@ package com.xhkjedu.sexam.service.report;
|
2
|
2
|
|
3
|
3
|
import com.alibaba.fastjson.JSON;
|
4
|
4
|
import com.xhkjedu.sexam.mapper.exam.EClassMapper;
|
|
5
|
+import com.xhkjedu.sexam.mapper.paper.EPaperAnalyzeMapper;
|
5
|
6
|
import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
|
6
|
7
|
import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
|
7
|
8
|
import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
|
|
@@ -10,17 +11,16 @@ import com.xhkjedu.sexam.mapper.report.EReportGenerateMapper;
|
10
|
11
|
import com.xhkjedu.sexam.mapper.report.ERsubjectMapper;
|
11
|
12
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassMapper;
|
12
|
13
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassQtypeMapper;
|
13
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionErrorMapper;
|
14
|
14
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionMapper;
|
15
|
15
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionPointMapper;
|
16
|
16
|
import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
|
|
17
|
+import com.xhkjedu.sexam.model.paper.EPaperAnalyze;
|
17
|
18
|
import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
|
18
|
19
|
import com.xhkjedu.sexam.model.report.ERbase;
|
19
|
20
|
import com.xhkjedu.sexam.model.report.ERsubject;
|
20
|
21
|
import com.xhkjedu.sexam.model.reportclass.ERclass;
|
21
|
22
|
import com.xhkjedu.sexam.model.reportclass.ERclassQtype;
|
22
|
23
|
import com.xhkjedu.sexam.model.reportclass.ERclassQuestion;
|
23
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassQuestionError;
|
24
|
24
|
import com.xhkjedu.sexam.model.reportclass.ERclassQuestionPoint;
|
25
|
25
|
import com.xhkjedu.sexam.model.reportstu.ERstudent;
|
26
|
26
|
import com.xhkjedu.sexam.utils.ExamUtil;
|
|
@@ -56,7 +56,8 @@ public class EReportGenerateService {
|
56
|
56
|
private EPaperQtypeMapper ePaperQtypeMapper;
|
57
|
57
|
@Resource
|
58
|
58
|
private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
|
59
|
|
-
|
|
59
|
+ @Resource
|
|
60
|
+ private EPaperAnalyzeMapper ePaperAnalyzeMapper;
|
60
|
61
|
|
61
|
62
|
@Resource
|
62
|
63
|
private ERbaseMapper eRbaseMapper;
|
|
@@ -72,8 +73,6 @@ public class EReportGenerateService {
|
72
|
73
|
private ERclassQuestionMapper eRclassQuestionMapper;
|
73
|
74
|
@Resource
|
74
|
75
|
private ERclassQuestionPointMapper eRclassQuestionPointMapper;
|
75
|
|
- @Resource
|
76
|
|
- private ERclassQuestionErrorMapper eRclassQuestionErrorMapper;
|
77
|
76
|
|
78
|
77
|
|
79
|
78
|
//生成考试报告
|
|
@@ -161,7 +160,6 @@ public class EReportGenerateService {
|
161
|
160
|
List<ERclass> classList = new ArrayList<>();//考试报告班级情况
|
162
|
161
|
List<ERclassQtype> qtypeList = new ArrayList<>();//考试报告班级题型情况
|
163
|
162
|
List<ERclassQuestion> questionList = new ArrayList<>();//考试报告班级试题情况
|
164
|
|
- List<ERclassQuestionError> errorList = new ArrayList<>();//考试报告班级高频错题情况
|
165
|
163
|
List<ERclassQuestionPoint> pointList = new ArrayList<>();//考试报告班级试题知识点情况
|
166
|
164
|
for (Map.Entry<String, List<ERstudent>> ssEntry : subCollect.entrySet()) {
|
167
|
165
|
subjectid = ssEntry.getKey();
|
|
@@ -336,7 +334,7 @@ public class EReportGenerateService {
|
336
|
334
|
}
|
337
|
335
|
}
|
338
|
336
|
|
339
|
|
- //题型试题
|
|
337
|
+ //试卷题型、试题、知识点
|
340
|
338
|
private void setClassQuestion(Integer examid,List<Map> subjects,List<Map> classes){
|
341
|
339
|
//考试所有学生提交试卷情况
|
342
|
340
|
List<EPaperStudentQuestion> stulist = ePaperStudentQuestionMapper.listExamStudentsAnswer(examid);
|
|
@@ -462,6 +460,26 @@ public class EReportGenerateService {
|
462
|
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
|
484
|
eRclassQtypeMapper.insertList(rtypelist);
|
467
|
485
|
eRclassQuestionMapper.insertList(rqlist);
|