Browse Source

完善知识点后生成报告

ywx
王宁 1 week ago
parent
commit
1bf2a3a582

+ 5
- 6
smarking/src/main/java/com/xhkjedu/smarking/controller/report/ZhReportController.java View File

@@ -33,9 +33,8 @@ public class ZhReportController {
33 33
     private MsrStudentService msrStudentService;
34 34
     @Resource
35 35
     private MsrClassQuestionService msrClassQuestionService;
36
-
37 36
     /*
38
-     * @Description 校级报告-小分表-列表
37
+     * @Description 小分表-列表
39 38
      * @Date 2024/12/24 10:25:06
40 39
      * @Author WN
41 40
      * @Param [subject]
@@ -53,7 +52,7 @@ public class ZhReportController {
53 52
     }
54 53
 
55 54
     /*
56
-     * @Description 校级报告-试题汇总-全部班-科目情况
55
+     * @Description 试题汇总-全部班-科目情况
57 56
      * @Date 2024/12/24 14:47:43
58 57
      * @Author WN
59 58
      * @Param [subject]
@@ -67,7 +66,7 @@ public class ZhReportController {
67 66
     }
68 67
 
69 68
     /*
70
-     * @Description 综合报告-试题汇总表-全部分类-按小题分析
69
+     * @Description 试题汇总表-全部分类-按小题分析
71 70
      * @Date 2024/12/24 15:46:14
72 71
      * @Author WN
73 72
      * @Param [params]
@@ -80,7 +79,7 @@ public class ZhReportController {
80 79
     }
81 80
 
82 81
     /*
83
-     * @Description 综合报告-试题汇总表-全部分类-按大题分析
82
+     * @Description 试题汇总表-全部分类-按大题分析
84 83
      * @Date 2024/12/24 17:19:02
85 84
      * @Author WN
86 85
      * @Param [params]
@@ -93,7 +92,7 @@ public class ZhReportController {
93 92
     }
94 93
 
95 94
     /*
96
-     * @Description 综合报告-试题汇总表-全部分类-按主(客)题分析
95
+     * @Description 试题汇总表-全部分类-按主(客)题分析
97 96
      * @Date 2024/12/24 17:27:44
98 97
      * @Author WN
99 98
      * @Param [params]

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsClassStudentMapper.java View File

@@ -54,5 +54,5 @@ public interface MsClassStudentMapper extends TkMapper<MsClassStudent> {
54 54
     List<Map> searchStudent(@Param("cs") CStudentVo cs);
55 55
 
56 56
     //获取考试关联学生
57
-    List<MsClassStudent> listStudentByExamId(@Param("examid") Integer examid);
57
+    List<MsClassStudent> listStudentByExamId(@Param("examid") Integer examid, @Param("subjectid") String subjectid);
58 58
 }

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportstu/MsrStudentMapper.java View File

@@ -15,7 +15,7 @@ import java.util.Map;
15 15
  */
16 16
 public interface MsrStudentMapper extends TkMapper<MsrStudent> {
17 17
     //获取学生考试得分和排名
18
-    List<MsrStudent> listStuScoreAndRankByExamid(@Param("examid") int examid);
18
+    List<MsrStudent> listStuScoreAndRankByExamid(@Param("examid") int examid,@Param("subjectid") String subjectid);
19 19
     //批量修改学生主观题、客观题分值
20 20
     void updateBatchObjSubScore(@Param("list") List<MsrStudent> list);
21 21
     //综合报告-小分表-学生分数排名

+ 1
- 2
smarking/src/main/java/com/xhkjedu/smarking/mapper/stupaper/MsPaperStudentQuestionMapper.java View File

@@ -6,7 +6,6 @@ import com.xhkjedu.smarking.model.stupaper.MsPaperStudentBlock;
6 6
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
7 7
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestionScore;
8 8
 import com.xhkjedu.smarking.vo.paper.SQScoreVo;
9
-import com.xhkjedu.smarking.vo.paper.SQuestionVo;
10 9
 import com.xhkjedu.smarking.vo.stupaper.QuestionAnswerVo;
11 10
 import org.apache.ibatis.annotations.Param;
12 11
 
@@ -66,7 +65,7 @@ public interface MsPaperStudentQuestionMapper extends TkMapper<MsPaperStudentQue
66 65
     void saveBatchStuPaperQuestion(@Param("list") List<MsPaperStudentQuestion> list);
67 66
 
68 67
     //获取考试所有参考学生作答情况
69
-    List<MsPaperStudentQuestion> listAllStuQuesByExamid(@Param("examid") Integer examid);
68
+    List<MsPaperStudentQuestion> listAllStuQuesByExamid(@Param("examid") Integer examid,@Param("subjectid")String subjectid);
70 69
 
71 70
     //获取参与统计科目单题得分情况
72 71
     List<SQScoreVo> listByMpIds(@Param("mpids") List<Integer> mpids);

+ 1
- 24
smarking/src/main/java/com/xhkjedu/smarking/service/report/generate/ReportGeneratePointService.java View File

@@ -2,13 +2,11 @@ package com.xhkjedu.smarking.service.report.generate;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.smarking.mapper.paper.MsPaperAnalyzeMapper;
5
-import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
6 5
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentPointMapper;
7 6
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointMapper;
8 7
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointRankgroupMapper;
9 8
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointSectionMapper;
10 9
 import com.xhkjedu.smarking.model.exam.MsClassStudent;
11
-import com.xhkjedu.smarking.model.paper.MsPaper;
12 10
 import com.xhkjedu.smarking.model.paper.MsPaperAnalyze;
13 11
 import com.xhkjedu.smarking.model.paper.MsPaperQtypeQuestion;
14 12
 import com.xhkjedu.smarking.model.report.reportstu.MsrStudent;
@@ -17,7 +15,6 @@ import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPoint;
17 15
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointRankgroup;
18 16
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointSection;
19 17
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
20
-import com.xhkjedu.smarking.service.paper.MsPaperAnalyzeService;
21 18
 import com.xhkjedu.smarking.utils.MarkingUtil;
22 19
 import com.xhkjedu.smarking.vo.paper.QuestionPointVo;
23 20
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
@@ -52,14 +49,10 @@ public class ReportGeneratePointService {
52 49
     private MsrSubjectPointRankgroupMapper msrSubjectPointRankgroupMapper;
53 50
     @Resource
54 51
     private MsrStudentPointMapper msrStudentPointMapper;
55
-    @Resource
56
-    private MsPaperMapper msPaperMapper;
57
-    @Resource
58
-    private MsPaperAnalyzeService msPaperAnalyzeService;
59 52
 
60 53
     //知识点分析,题库知识点按母题分析
61 54
     public void generatePoint(List<MsPaperStudentQuestion> stuSubjectQuestions, List<MsPaperQtypeQuestion> qtypeQuestions,List<MsClassStudent> classStus,
62
-                            List<MsrStudent> sturanks, Integer examid, String subjectid, Integer mpid, Double pscore) throws Exception {
55
+                            List<MsrStudent> sturanks, Integer examid, String subjectid, Integer mpid, Double pscore) {
63 56
         //获取试卷分析
64 57
         MsPaperAnalyze paperAnalyze = msPaperAnalyzeMapper.getObjByMpId(mpid);
65 58
         if(paperAnalyze == null || N_Utils.isEmpty(paperAnalyze.getPointjson())) return;
@@ -616,20 +609,4 @@ public class ReportGeneratePointService {
616 609
         }
617 610
     }
618 611
 
619
-
620
-    public void handleQuestionPointAndAnalyze(Integer mpid){
621
-        //获取试卷基础信息
622
-        MsPaper paper = msPaperMapper.selectByPrimaryKey(mpid);
623
-        //先生产学生报告
624
-        if(paper.getPtype() == 1){
625
-            msPaperAnalyzeService.savePaperAnalyzeForQuestion(paper);
626
-        }else{
627
-            msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
628
-        }
629
-
630
-        //删除试卷试题信息
631
-        msrSubjectPointMapper.deletePointAnalyze(paper.getExamid(),paper.getSubjectid());
632
-
633
-
634
-    }
635 612
 }

+ 37
- 4
smarking/src/main/java/com/xhkjedu/smarking/service/report/generate/ReportGenerateQuestionService.java View File

@@ -3,6 +3,7 @@ package com.xhkjedu.smarking.service.report.generate;
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.smarking.mapper.exam.MsClassStudentMapper;
5 5
 import com.xhkjedu.smarking.mapper.exam.MsSubjectMapper;
6
+import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
6 7
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
7 8
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQobjsubMapper;
8 9
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQtypeMapper;
@@ -10,6 +11,7 @@ import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQuestionMapper;
10 11
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQuestionObjMapper;
11 12
 import com.xhkjedu.smarking.mapper.report.reportother.MsrReportparamMapper;
12 13
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentMapper;
14
+import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointMapper;
13 15
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionRankgroupMapper;
14 16
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionSectionMapper;
15 17
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentQuestionMapper;
@@ -25,6 +27,7 @@ import com.xhkjedu.smarking.model.report.reportstu.MsrStudent;
25 27
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionRankgroup;
26 28
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionSection;
27 29
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
30
+import com.xhkjedu.smarking.service.paper.MsPaperAnalyzeService;
28 31
 import com.xhkjedu.smarking.utils.MarkingUtil;
29 32
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
30 33
 import com.xhkjedu.smarking.vo.report.reportother.ReportParams;
@@ -71,14 +74,20 @@ public class ReportGenerateQuestionService {
71 74
     private MsrSubjectQuestionSectionMapper msrSubjectQuestionSectionMapper;
72 75
     @Resource
73 76
     private ReportGeneratePointService reportGeneratePointService;
77
+    @Resource
78
+    private MsPaperAnalyzeService msPaperAnalyzeService;
79
+    @Resource
80
+    private MsPaperMapper msPaperMapper;
81
+    @Resource
82
+    private MsrSubjectPointMapper msrSubjectPointMapper;
74 83
 
75 84
     @Transactional(rollbackFor = Exception.class)
76
-    public void generateQuestion(Integer examid, Integer exammode) throws Exception {
85
+    public void generateQuestion(Integer examid, Integer exammode) {
77 86
         // 查询所有学生试题
78
-        List<MsPaperStudentQuestion> stuQuestions = msPaperStudentQuestionMapper.listAllStuQuesByExamid(examid);
79
-        List<MsClassStudent> classStudents = msClassStudentMapper.listStudentByExamId(examid);
87
+        List<MsPaperStudentQuestion> stuQuestions = msPaperStudentQuestionMapper.listAllStuQuesByExamid(examid,null);
88
+        List<MsClassStudent> classStudents = msClassStudentMapper.listStudentByExamId(examid,null);
80 89
         List<MsPaper> subjects = msSubjectMapper.listReportSubject(examid, exammode);
81
-        List<MsrStudent> stuPapers = msrStudentMapper.listStuScoreAndRankByExamid(examid);
90
+        List<MsrStudent> stuPapers = msrStudentMapper.listStuScoreAndRankByExamid(examid,null);
82 91
         // 获取考试参数
83 92
         List<MsrReportparam> params = msrReportparamMapper.listReportparamByRpbelong(examid, "quesummary", null);
84 93
 
@@ -872,4 +881,28 @@ public class ReportGenerateQuestionService {
872 881
             msrClassQuestionMapper.updateBatchQfdById(saveQuestions);
873 882
         }
874 883
     }
884
+
885
+    //学科素养-标定知识点-保存加重新生成报告
886
+    @Transactional(rollbackFor = Exception.class)
887
+    public void handleQuestionPointAndAnalyze(Integer mpid) {
888
+        //保存新标定的知识点
889
+
890
+        //获取试卷基础信息
891
+        MsPaper paper = msPaperMapper.selectByPrimaryKey(mpid);
892
+        //先生产学生报告
893
+        if(paper.getPtype() == 1){
894
+            msPaperAnalyzeService.savePaperAnalyzeForQuestion(paper);
895
+        }else{
896
+            msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
897
+        }
898
+
899
+        //删除试卷试题信息
900
+        msrSubjectPointMapper.deletePointAnalyze(paper.getExamid(),paper.getSubjectid());
901
+        //获取试卷关联学生试题
902
+        List<MsPaperStudentQuestion> stuQuestions = msPaperStudentQuestionMapper.listAllStuQuesByExamid(paper.getExamid(),paper.getSubjectid());
903
+        List<MsPaperQtypeQuestion> qtypeQuestions = msPaperQtypeQuestionMapper.listQuestionsForReport(paper.getMpid());
904
+        List<MsClassStudent> classStus = msClassStudentMapper.listStudentByExamId(paper.getExamid(),paper.getSubjectid());
905
+        List<MsrStudent> stuPapers = msrStudentMapper.listStuScoreAndRankByExamid(paper.getExamid(),paper.getSubjectid());
906
+        reportGeneratePointService.generatePoint(stuQuestions,qtypeQuestions,classStus,stuPapers,paper.getExamid(),paper.getSubjectid(),paper.getMpid(),paper.getPscore());
907
+    }
875 908
 }

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/service/report/reportother/MsrExamService.java View File

@@ -93,7 +93,7 @@ public class MsrExamService {
93 93
         List<MsPaper> subjects = subjectMapper.listReportSubject(examid, exammode);//考试报告科目列表
94 94
         if (N_Utils.isListEmpty(subjects)) return;
95 95
         List<MsClass> classes = classMapper.listClassByExamId(examid);//获取考试关联班级
96
-        List<MsClassStudent> students = classStudentMapper.listStudentByExamId(examid);//获取考试关联学生
96
+        List<MsClassStudent> students = classStudentMapper.listStudentByExamId(examid,null);//获取考试关联学生
97 97
         List<Integer> mpids = new ArrayList<>();
98 98
         for (MsPaper subject : subjects) {
99 99
             Integer mpid = subject.getMpid();

+ 1
- 0
smarking/src/main/resources/mapper/exam/MsClassStudentMapper.xml View File

@@ -113,6 +113,7 @@
113 113
     <select id="listStudentByExamId" resultType="com.xhkjedu.smarking.model.exam.MsClassStudent">
114 114
         select examid,subjectid,classid,studentid
115 115
         from ms_class_student where examid=#{examid}
116
+        <if test="subjectid!=null and subjectid!=''"> and subjectid=#{subjectid} </if>
116 117
     </select>
117 118
     <!--移除单个科目学生-->
118 119
     <delete id="deleteByStu">

+ 1
- 0
smarking/src/main/resources/mapper/paper/MsPaperMapper.xml View File

@@ -129,4 +129,5 @@
129 129
         left join ms_paper p on s.msid=p.msid
130 130
         where p.mpid=#{mpid}
131 131
     </select>
132
+
132 133
 </mapper>

+ 1
- 0
smarking/src/main/resources/mapper/report/reportstu/MsrStudentMapper.xml View File

@@ -4,6 +4,7 @@
4 4
     <!--获取学生考试得分和排名-->
5 5
     <select id="listStuScoreAndRankByExamid" resultType="com.xhkjedu.smarking.model.report.reportstu.MsrStudent">
6 6
         select rsid,examid,subjectid,classid,studentid,stuscore,classrank,schoolrank from msr_student where examid = #{examid}
7
+        <if test="subjectid!= null and subjectid!= ''"> and subjectid = #{subjectid}</if>
7 8
     </select>
8 9
 
9 10
     <!--批量修改学生主观题、客观题分值-->

+ 3
- 1
smarking/src/main/resources/mapper/stupaper/MsPaperStudentQuestionMapper.xml View File

@@ -329,7 +329,9 @@
329 329
         sq.qscore,sq.answered,sq.answertype,sq.stuanswer,sq.stuscore,sq.stumerge,sq.hasgood,sq.hasbad
330 330
         from ms_paper_student_question sq
331 331
         left join ms_paper_student ps on sq.mpsid=ps.mpsid
332
-        where sq.examid=#{examid} and ps.sstate=2 order by sq.mpid,sq.studentid
332
+        where sq.examid=#{examid} and ps.sstate=2
333
+        <if test="subjectid!=null and subjectid!=''"> and sq.subjectid=#{subjectid} </if>
334
+        order by sq.mpid,sq.studentid
333 335
     </select>
334 336
     <!--获取参与统计科目单题得分情况-->
335 337
     <resultMap id="subjectScore" type="com.xhkjedu.smarking.vo.paper.SQScoreVo">

Loading…
Cancel
Save