Переглянути джерело

Merge remote-tracking branch 'origin/wn' into ywx

ywx
雍文秀 1 тиждень тому
джерело
коміт
52b20384aa

+ 221
- 89
smarking/src/main/java/com/xhkjedu/smarking/service/report/generate/ReportGeneratePointService.java Переглянути файл

@@ -18,6 +18,7 @@ import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
18 18
 import com.xhkjedu.smarking.vo.report.reportstu.PointQuestionVo;
19 19
 import com.xhkjedu.smarking.vo.report.reportstu.PointStudentVo;
20 20
 import com.xhkjedu.smarking.vo.report.reportsubject.PointLevelVo;
21
+import com.xhkjedu.smarking.vo.report.reportsubject.PointParams;
21 22
 import com.xhkjedu.smarking.vo.report.reportsubject.PointVo;
22 23
 import com.xhkjedu.utils.N_Utils;
23 24
 import org.springframework.stereotype.Service;
@@ -85,102 +86,95 @@ public class ReportGeneratePointService {
85 86
 
86 87
         //学科总分区间学生
87 88
         List<MsrSubjectPointSection> pointSections = setPointSection(sturanks,pscore);
89
+        Map<Integer,String> qnMap = qtypeQuestions.stream().collect(Collectors.toMap(q-> q.getMptqid(), q -> q.getMptqn() + "." + q.getQn()));
88 90
 
89
-        // 根据试卷知识点分析进行生成学生、年级知识点分析
90
-        for (PointQuestionVo pqvo : pointques){
91
+        //知识点本分分析(三级知识点分析)
92
+        for(PointQuestionVo pqvo : pointques){
91 93
             List<QuestionPointVo> quePoints = pqvo.getQues();//知识点下试题
92
-            //获取所有试题的mptqids
93
-            List<Integer> mptqids = new ArrayList<>();
94
-            for(QuestionPointVo qpv : quePoints){
95
-                mptqids.addAll(qpv.getMptqids());
96
-            }
97
-            //获取试题对应的qn
98
-            List<MsPaperQtypeQuestion> qtypeQues =  qtypeQuestions.stream().filter(q -> mptqids.contains(q.getMptqid())).collect(Collectors.toList());
99
-            String qnStr = qtypeQues.stream().map(q -> q.getMptqn()  + "." + q.getQn()).collect(Collectors.joining(","));
100
-            String mptqidStr = mptqids.stream().map(Object::toString).collect(Collectors.joining(","));
101 94
             // 单个知识点学生得分情况:一个知识对应一个或多个试题,
102 95
             List<PointStudentVo> stuPoints = schoolStuPoints.stream().filter(ps -> ps.getPointid().equals(pqvo.getPointid())).collect(Collectors.toList());
103
-            //知识点下多个试题,处理成单个学生总分值情况
104
-            List<PointStudentVo> pointStuScores = new ArrayList<>();//处理成学生知识点形式,后续计算使用
105
-            Map<Integer, List<PointStudentVo>> pointStuMap = stuPoints.stream().collect(Collectors.groupingBy(PointStudentVo::getStudentid));
106
-            for (Map.Entry<Integer, List<PointStudentVo>> entry : pointStuMap.entrySet()){
107
-                List<PointStudentVo> pstuScores = entry.getValue();
108
-                Double stuScore = pstuScores.stream().mapToDouble(PointStudentVo::getStuscore).sum();
109
-                stuScore = N_Utils.formatDouble(stuScore, 1);
110
-                PointStudentVo firstPointStuVo = pstuScores.get(0);
111
-                PointStudentVo pstuvo = new PointStudentVo();
112
-                pstuvo.setStudentid(entry.getKey());
113
-                pstuvo.setPointid(firstPointStuVo.getPointid());
114
-                pstuvo.setStuscore(stuScore);
115
-                pstuvo.setScore(firstPointStuVo.getScore());
116
-                pointStuScores.add(pstuvo);
117
-            }
118
-
119
-            MsrSubjectPoint subjectPoint = new MsrSubjectPoint();
120
-            subjectPoint.setExamid(examid);
121
-            subjectPoint.setSubjectid(subjectid);
122
-            subjectPoint.setPointid(pqvo.getPointid());
123
-            subjectPoint.setClassid(0);
124
-            subjectPoint.setPointname(pqvo.getPointname());
125
-            subjectPoint.setFullscore(pqvo.getScore());
126
-            subjectPoint.setPointlevel(3);//3级知识点分析
127
-            subjectPoint.setMptqids(mptqidStr);
128
-            subjectPoint.setQns(qnStr);
129
-
130
-            //校知识点分析
131
-            MsrSubjectPoint schoolPoint = pointLevelClass(pointStuScores, subjectPoint);
132
-            saveSubjectPoints.add(schoolPoint);
133
-
134
-            //班级知识点分析
135
-            List<Integer> classIds = classStus.stream().map(MsClassStudent::getClassid).distinct().collect(Collectors.toList());
136
-            List<MsrSubjectPoint> classPoints = new ArrayList<>();
137
-            for (Integer classid : classIds) {
138
-                // 获取班级下学生id
139
-                List<Integer> classStuIds = classStus.stream().filter(c -> c.getClassid().equals(classid)).map(MsClassStudent::getStudentid).collect(Collectors.toList());
140
-                // 获取班级下学生试题
141
-                List<PointStudentVo> classStuPoints = pointStuScores.stream().filter(q -> classStuIds.contains(q.getStudentid())).collect(Collectors.toList());
142
-                subjectPoint.setClassid(classid);
143
-                MsrSubjectPoint classPoint = pointLevelClass(classStuPoints, subjectPoint);
144
-                classPoints.add(classPoint);
145
-            }
146
-
147
-            // 班级知识点保存后,要对平均分排序
148
-            List<Double> avgScores = classPoints.stream().map(MsrSubjectPoint::getAvgscore).collect(Collectors.toList());
149
-            Map<Double,Integer> avgScoreRankMap = MarkingUtil.fspm(avgScores);
150
-            for(MsrSubjectPoint sp : classPoints){
151
-                sp.setAvgrank(avgScoreRankMap.get(sp.getAvgscore()));
152
-            }
153
-            saveSubjectPoints.addAll(classPoints);
154 96
 
155
-            //知识点结构与总分的相关性(三级知识点)
156
-            List<MsrSubjectPointSection> pointSecs = pointSection(pointStuScores, pointSections, pqvo, 3);
157
-            savePointSections.addAll(pointSecs);
97
+            PointParams pointParams = new PointParams();
98
+            pointParams.setPointid(pqvo.getPointid());
99
+            pointParams.setPointname(pqvo.getPointname());
100
+            pointParams.setFullscore(pqvo.getScore());
101
+            pointParams.setExamid(examid);
102
+            pointParams.setSubjectid(subjectid);
103
+            pointParams.setPointlevel(3);
104
+            //三级知识点对应信息
105
+            pointTopAndUpForOther(stuPoints,quePoints,qnMap,pointParams,classStus,pointSections,sturanks,saveStuPoints,saveSubjectPoints,savePointSections,savePointRankgroups);
106
+        }
158 107
 
159
-            //知识点考生分组分析
160
-            List<MsrSubjectPointRankgroup> pointRankg = pointRankGroup(pointStuScores,sturanks, pqvo, examid, subjectid, 3);
161
-            savePointRankgroups.addAll(pointRankg);
108
+        //获取知识点顶级和上级知识点
109
+        Map<String,Map<String,List<PointLevelVo>>> pointTopAndUpMap = listSubjectPoints(subjectid,examid,pointques);
110
+        Map<String,List<PointLevelVo>> pointUpMap = pointTopAndUpMap.get("up");//上级知识点
111
+        Map<String,List<PointLevelVo>> pointTopMap = pointTopAndUpMap.get("top");//顶级知识点
112
+        //知识点分析--三级知识点(知识点分析)
113
+        Map<String, List<MsrSubjectPoint>> subjectPointMap = saveSubjectPoints.stream().filter(p -> p.getPointlevel()==3).collect(Collectors.groupingBy(MsrSubjectPoint::getPointid));
114
+        //知识点学科总分区间--三级知识点(知识点分析)
115
+        Map<String, List<MsrSubjectPointSection>> pointSectionMap = savePointSections.stream().filter(p -> p.getPointlevel()==3).collect(Collectors.groupingBy(MsrSubjectPointSection::getPointid));
116
+        //知识点分组--三级知识点(知识点分析)
117
+        Map<String, List<MsrSubjectPointRankgroup>> pointRankgroupMap = savePointRankgroups.stream().filter(p -> p.getPointlevel()==3).collect(Collectors.groupingBy(MsrSubjectPointRankgroup::getPointid));
162 118
 
163
-            double schoolSumScore = pointStuScores.stream().mapToDouble(PointStudentVo::getStuscore).sum();
164
-            int stunum = pointStuScores.size();
165
-            double schoolAvgScore = MarkingUtil.div(schoolSumScore, stunum);
166
-            double schoolScoreRate = MarkingUtil.calculateRate(schoolSumScore, pqvo.getScore() * stunum);
119
+        //上层知识点(二级知识点)
120
+        for(Map.Entry<String,List<PointLevelVo>> entry : pointUpMap.entrySet()) {
121
+            List<PointLevelVo> pointLevels = entry.getValue();
122
+            PointLevelVo firstPoint = pointLevels.get(0);
123
+            if(pointLevels.size() == 1){
124
+                //上层知识点下知识点只有一个,该知识点的分析和三级知识点一致
125
+                pointTopAndUpForSelf(firstPoint,2,subjectPointMap,pointSectionMap,pointRankgroupMap,saveSubjectPoints,savePointSections,savePointRankgroups);
126
+            }else{
127
+                //上层知识点所包含的知识点id集合
128
+                List<String> pointids = pointLevels.stream().map(PointLevelVo::getPointid).collect(Collectors.toList());
129
+                //知识点下试题,以及学生得分
130
+                List<PointQuestionVo> levelPointQues = pointques.stream().filter(q -> pointids.contains(q.getPointid())).collect(Collectors.toList());
131
+                List<PointStudentVo> stuPoints = schoolStuPoints.stream().filter(q -> pointids.contains(q.getPointid())).collect(Collectors.toList());
132
+                List<QuestionPointVo> ques = new ArrayList<>();//知识点下所有试题
133
+                for(PointQuestionVo point : levelPointQues) {
134
+                    ques.addAll(point.getQues());
135
+                }
136
+                Double fullScore = levelPointQues.stream().mapToDouble(PointQuestionVo::getScore).sum();
137
+                fullScore = N_Utils.formatDouble(fullScore, 1);
138
+                PointParams pointParams = new PointParams();
139
+                pointParams.setPointid(firstPoint.getTopPointid());
140
+                pointParams.setPointname(firstPoint.getTopPointname());
141
+                pointParams.setFullscore(fullScore);
142
+                pointParams.setExamid(examid);
143
+                pointParams.setSubjectid(subjectid);
144
+                pointParams.setPointlevel(2);
145
+                //级知识点对应信息
146
+                pointTopAndUpForOther(stuPoints,ques,qnMap,pointParams,classStus,pointSections,sturanks,saveStuPoints,saveSubjectPoints,savePointSections,savePointRankgroups);
147
+            }
148
+        }
167 149
 
168
-            //处理学生得分情况
169
-            for(PointStudentVo pstuvo : pointStuScores){
170
-                MsrStudentPoint stuPoint = new MsrStudentPoint();
171
-                stuPoint.setExamid(examid);
172
-                stuPoint.setSubjectid(subjectid);
173
-                stuPoint.setStudentid(pstuvo.getStudentid());
174
-                stuPoint.setPointid(pqvo.getPointid());
175
-                stuPoint.setPointname(pqvo.getPointname());
176
-                stuPoint.setFullscore(pqvo.getScore());
177
-                stuPoint.setStuscore(pstuvo.getStuscore());
178
-                stuPoint.setSturate(MarkingUtil.calculateRate(pstuvo.getStuscore(), pqvo.getScore()));
179
-                stuPoint.setSchoolavg(schoolAvgScore);
180
-                stuPoint.setSchoolrate(schoolScoreRate);
181
-                stuPoint.setQns(qnStr);
182
-                stuPoint.setMptqid(mptqidStr);
183
-                saveStuPoints.add(stuPoint);
150
+        //顶级知识点 (一级知识点)
151
+        for(Map.Entry<String,List<PointLevelVo>> entry : pointTopMap.entrySet()) {
152
+            List<PointLevelVo> pointLevels = entry.getValue();
153
+            PointLevelVo firstPoint = pointLevels.get(0);
154
+            if(pointLevels.size() == 1){
155
+                //上层知识点下知识点只有一个,该知识点的分析和三级知识点一致
156
+                pointTopAndUpForSelf(firstPoint,1,subjectPointMap,pointSectionMap,pointRankgroupMap,saveSubjectPoints,savePointSections,savePointRankgroups);
157
+            }else{
158
+                //上层知识点所包含的知识点id集合
159
+                List<String> pointids = pointLevels.stream().map(PointLevelVo::getPointid).collect(Collectors.toList());
160
+                //知识点下试题,以及学生得分
161
+                List<PointQuestionVo> levelPointQues = pointques.stream().filter(q -> pointids.contains(q.getPointid())).collect(Collectors.toList());
162
+                List<PointStudentVo> stuPoints = schoolStuPoints.stream().filter(q -> pointids.contains(q.getPointid())).collect(Collectors.toList());
163
+                List<QuestionPointVo> ques = new ArrayList<>();//知识点下所有试题
164
+                for(PointQuestionVo point : levelPointQues) {
165
+                    ques.addAll(point.getQues());
166
+                }
167
+                Double fullScore = levelPointQues.stream().mapToDouble(PointQuestionVo::getScore).sum();
168
+                fullScore = N_Utils.formatDouble(fullScore, 1);
169
+                PointParams pointParams = new PointParams();
170
+                pointParams.setPointid(firstPoint.getTopPointid());
171
+                pointParams.setPointname(firstPoint.getTopPointname());
172
+                pointParams.setFullscore(fullScore);
173
+                pointParams.setExamid(examid);
174
+                pointParams.setSubjectid(subjectid);
175
+                pointParams.setPointlevel(1);
176
+                //级知识点对应信息
177
+                pointTopAndUpForOther(stuPoints,ques,qnMap,pointParams,classStus,pointSections,sturanks,saveStuPoints,saveSubjectPoints,savePointSections,savePointRankgroups);
184 178
             }
185 179
         }
186 180
     }
@@ -422,7 +416,145 @@ public class ReportGeneratePointService {
422 416
         return current;
423 417
     }
424 418
 
425
-    //处理顶级、上级知识点
419
+    //层级知识点分析--顶层和上层知识点是知识点本身
420
+    private void pointTopAndUpForSelf(PointLevelVo firstPoint,Integer pointlevel,Map<String, List<MsrSubjectPoint>> subjectPointMap,
421
+            Map<String, List<MsrSubjectPointSection>> pointSectionMap,Map<String, List<MsrSubjectPointRankgroup>> pointRankgroupMap,
422
+            List<MsrSubjectPoint> saveSubjectPoints,List<MsrSubjectPointSection> savePointSections, List<MsrSubjectPointRankgroup> savePointRankgroups){
423
+
424
+        //知识点分析
425
+        List<MsrSubjectPoint> subpoints = subjectPointMap.get(firstPoint.getPointid());
426
+        for(MsrSubjectPoint subpoint : subpoints){
427
+            subpoint.setPointid(firstPoint.getTopPointid());
428
+            subpoint.setPointname(firstPoint.getPointname());
429
+            subpoint.setPointlevel(pointlevel);
430
+            saveSubjectPoints.add(subpoint);
431
+        }
432
+
433
+        //分数分段
434
+        List<MsrSubjectPointSection> sepoints = pointSectionMap.get(firstPoint.getPointid());
435
+        for(MsrSubjectPointSection sepoint : sepoints) {
436
+            sepoint.setPointid(firstPoint.getTopPointid());
437
+            sepoint.setPointname(firstPoint.getPointname());
438
+            sepoint.setPointlevel(pointlevel);
439
+            savePointSections.add(sepoint);
440
+        }
441
+
442
+        //分组分析
443
+        List<MsrSubjectPointRankgroup> rgpoints = pointRankgroupMap.get(firstPoint.getPointid());
444
+        for(MsrSubjectPointRankgroup rgpoint : rgpoints) {
445
+            rgpoint.setPointid(firstPoint.getTopPointid());
446
+            rgpoint.setPointname(firstPoint.getPointname());
447
+            rgpoint.setPointlevel(pointlevel);
448
+            savePointRankgroups.add(rgpoint);
449
+        }
450
+    }
451
+    //层级知识点分析--顶层和上层知识点下多知识点分析
452
+    private void pointTopAndUpForOther(List<PointStudentVo> levelStuPoints, List<QuestionPointVo> ques, Map<Integer,String> qnMap, PointParams pointParam,
453
+                                        List<MsClassStudent> classStus, List<MsrSubjectPointSection> pointSections, List<MsrStudent> sturanks,List<MsrStudentPoint> saveStuPoints,
454
+                                        List<MsrSubjectPoint> saveSubjectPoints, List<MsrSubjectPointSection> savePointSections, List<MsrSubjectPointRankgroup> savePointRankgroups){
455
+
456
+        List<Integer> mptqids = ques.stream().map(QuestionPointVo::getMptqid).distinct().collect(Collectors.toList());
457
+        String qnStr="";
458
+        String mptqidStr = mptqids.stream().map(Object::toString).collect(Collectors.joining(","));
459
+        for(Map.Entry<Integer,String> qnentry : qnMap.entrySet()){
460
+            if(mptqids.contains(qnentry.getKey())){
461
+                qnStr = qnStr + qnentry.getValue() + ",";
462
+            }
463
+        }
464
+        if(N_Utils.isNotEmpty(qnStr)){
465
+            qnStr = qnStr.substring(0,qnStr.length()-1);
466
+        }
467
+
468
+        //知识点多个试题,处理成单个学生试题总分值
469
+        List<PointStudentVo> pointStuScores = new ArrayList<>();//处理成学生知识点形式,后续计算使用
470
+        Map<Integer, List<PointStudentVo>> pointStuMap = levelStuPoints.stream().collect(Collectors.groupingBy(PointStudentVo::getStudentid));
471
+        for (Map.Entry<Integer, List<PointStudentVo>> psentry : pointStuMap.entrySet()){
472
+            List<PointStudentVo> pstuScores = psentry.getValue();
473
+            double stuScore = pstuScores.stream().mapToDouble(PointStudentVo::getStuscore).sum();
474
+            stuScore = N_Utils.formatDouble(stuScore, 1);
475
+            PointStudentVo pstuvo = new PointStudentVo();
476
+            pstuvo.setStudentid(psentry.getKey());
477
+            pstuvo.setPointid(pointParam.getPointid());
478
+            pstuvo.setStuscore(stuScore);
479
+            pstuvo.setScore(pointParam.getFullscore());
480
+            pointStuScores.add(pstuvo);
481
+        }
482
+
483
+        MsrSubjectPoint subjectPoint = new MsrSubjectPoint();
484
+        subjectPoint.setExamid(pointParam.getExamid());
485
+        subjectPoint.setSubjectid(pointParam.getSubjectid());
486
+        subjectPoint.setPointid(pointParam.getPointid());
487
+        subjectPoint.setClassid(0);
488
+        subjectPoint.setPointname(pointParam.getPointid());
489
+        subjectPoint.setFullscore(pointParam.getFullscore());
490
+        subjectPoint.setPointlevel(pointParam.getPointlevel());
491
+        subjectPoint.setMptqids(mptqidStr);
492
+        subjectPoint.setQns(qnStr);
493
+
494
+        //校知识点分析
495
+        MsrSubjectPoint schoolPoint = pointLevelClass(pointStuScores, subjectPoint);
496
+        saveSubjectPoints.add(schoolPoint);
497
+
498
+        //班级知识点分析
499
+        List<Integer> classIds = classStus.stream().map(MsClassStudent::getClassid).distinct().collect(Collectors.toList());
500
+        List<MsrSubjectPoint> classPoints = new ArrayList<>();
501
+        for (Integer classid : classIds) {
502
+            // 获取班级下学生id
503
+            List<Integer> classStuIds = classStus.stream().filter(c -> c.getClassid().equals(classid)).map(MsClassStudent::getStudentid).collect(Collectors.toList());
504
+            // 获取班级下学生试题
505
+            List<PointStudentVo> classStuPoints = pointStuScores.stream().filter(q -> classStuIds.contains(q.getStudentid())).collect(Collectors.toList());
506
+            subjectPoint.setClassid(classid);
507
+            MsrSubjectPoint classPoint = pointLevelClass(classStuPoints, subjectPoint);
508
+            classPoints.add(classPoint);
509
+        }
510
+
511
+        // 班级知识点保存后,要对平均分排序
512
+        List<Double> avgScores = classPoints.stream().map(MsrSubjectPoint::getAvgscore).collect(Collectors.toList());
513
+        Map<Double,Integer> avgScoreRankMap = MarkingUtil.fspm(avgScores);
514
+        for(MsrSubjectPoint sp : classPoints){
515
+            sp.setAvgrank(avgScoreRankMap.get(sp.getAvgscore()));
516
+        }
517
+        saveSubjectPoints.addAll(classPoints);
518
+
519
+        PointQuestionVo pqvo = new PointQuestionVo();
520
+        pqvo.setPointid(pointParam.getPointid());
521
+        pqvo.setPointname(pointParam.getPointname());
522
+        pqvo.setScore(pointParam.getFullscore());
523
+
524
+        //知识点分段分析(知识点与总分的相关性)
525
+        List<MsrSubjectPointSection> pointSecs = pointSection(pointStuScores, pointSections, pqvo, pointParam.getPointlevel());
526
+        savePointSections.addAll(pointSecs);
527
+
528
+        //知识点考生分组分析
529
+        List<MsrSubjectPointRankgroup> pointRankg = pointRankGroup(pointStuScores,sturanks, pqvo, pointParam.getExamid(), pointParam.getSubjectid(), pointParam.getPointlevel());
530
+        savePointRankgroups.addAll(pointRankg);
531
+
532
+        if(pointParam.getPointlevel() == 3){
533
+            double schoolSumScore = pointStuScores.stream().mapToDouble(PointStudentVo::getStuscore).sum();
534
+            int stunum = pointStuScores.size();
535
+            double schoolAvgScore = MarkingUtil.div(schoolSumScore, stunum);
536
+            double schoolScoreRate = MarkingUtil.calculateRate(schoolSumScore, pqvo.getScore() * stunum);
537
+            //处理学生得分情况
538
+            for(PointStudentVo pstuvo : pointStuScores){
539
+                MsrStudentPoint stuPoint = new MsrStudentPoint();
540
+                stuPoint.setExamid(pointParam.getExamid());
541
+                stuPoint.setSubjectid(pointParam.getSubjectid());
542
+                stuPoint.setStudentid(pstuvo.getStudentid());
543
+                stuPoint.setPointid(pqvo.getPointid());
544
+                stuPoint.setPointname(pqvo.getPointname());
545
+                stuPoint.setFullscore(pqvo.getScore());
546
+                stuPoint.setStuscore(pstuvo.getStuscore());
547
+                stuPoint.setSturate(MarkingUtil.calculateRate(pstuvo.getStuscore(), pqvo.getScore()));
548
+                stuPoint.setSchoolavg(schoolAvgScore);
549
+                stuPoint.setSchoolrate(schoolScoreRate);
550
+                stuPoint.setQns(qnStr);
551
+                stuPoint.setMptqid(mptqidStr);
552
+                saveStuPoints.add(stuPoint);
553
+            }
554
+        }
555
+
556
+    }
557
+    //处理顶级、上级知识点---已不用
426 558
     private void handlePointLevel(Map<String,List<PointLevelVo>> pointMap,List<PointQuestionVo> pointques,List<PointStudentVo> schoolStuPoints,Integer pointlevel,List<MsrSubjectPointSection> pointSections,
427 559
                                     List<MsPaperQtypeQuestion> qtypeQuestions,List<MsClassStudent> classStus,Integer examid,String subjectid,List<MsrStudent> sturanks,
428 560
                                     List<MsrSubjectPoint> saveSubjectPoints,List<MsrSubjectPointSection> savePointSections,List<MsrSubjectPointRankgroup> savePointRankgroups){

+ 6
- 3
smarking/src/main/java/com/xhkjedu/smarking/service/report/generate/ReportGenerateQuestionService.java Переглянути файл

@@ -64,10 +64,11 @@ public class ReportGenerateQuestionService {
64 64
     @Resource
65 65
     private MsrClassQtypeMapper msrClassQtypeMapper;
66 66
     @Resource
67
-    MsrSubjectQuestionRankgroupMapper msrSubjectQuestionRankgroupMapper;
67
+    private MsrSubjectQuestionRankgroupMapper msrSubjectQuestionRankgroupMapper;
68 68
     @Resource
69
-    MsrSubjectQuestionSectionMapper msrSubjectQuestionSectionMapper;
70
-
69
+    private MsrSubjectQuestionSectionMapper msrSubjectQuestionSectionMapper;
70
+    @Resource
71
+    private ReportGeneratePointService reportGeneratePointService;
71 72
 
72 73
     public void generateQuestion(Integer examid, Integer exammode) {
73 74
         // 查询所有学生试题
@@ -99,6 +100,8 @@ public class ReportGenerateQuestionService {
99 100
             handleQtype(subjectStuQuestions, subjectClassStudents, questions, subjectParams, examid, subjectid);
100 101
             //客观题、主观题
101 102
             handleObjSub(subjectStuQuestions, subjectClassStudents, questions, subjectStuPapers, examid, subjectid,subject.getPscore());
103
+            //知识点相关分析
104
+            reportGeneratePointService.generatePoint(subjectStuQuestions,questions,classStudents,stuPapers,examid,subjectid,subject.getMpid(),subject.getPscore());
102 105
         }
103 106
     }
104 107
 

+ 24
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/report/reportsubject/PointParams.java Переглянути файл

@@ -0,0 +1,24 @@
1
+package com.xhkjedu.smarking.vo.report.reportsubject;
2
+
3
+import lombok.Data;
4
+
5
+/**
6
+ * @Description:知识点传参数
7
+ * @Author: WN
8
+ * @Date: 2024/12/19 10:11:32
9
+ **/
10
+@Data
11
+public class PointParams {
12
+
13
+    private Integer examid;
14
+
15
+    private String subjectid;
16
+
17
+    private String pointid;
18
+
19
+    private String pointname;
20
+
21
+    private Double fullscore;//知识点满分
22
+
23
+    private Integer pointlevel;//1一级知识点(顶层),2二级知识点(上层),3三级知识点(自身)
24
+}

Завантаження…
Відмінити
Зберегти