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

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

54
     List<Map> searchStudent(@Param("cs") CStudentVo cs);
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
  */
15
  */
16
 public interface MsrStudentMapper extends TkMapper<MsrStudent> {
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
     void updateBatchObjSubScore(@Param("list") List<MsrStudent> list);
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
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
6
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
7
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestionScore;
7
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestionScore;
8
 import com.xhkjedu.smarking.vo.paper.SQScoreVo;
8
 import com.xhkjedu.smarking.vo.paper.SQScoreVo;
9
-import com.xhkjedu.smarking.vo.paper.SQuestionVo;
10
 import com.xhkjedu.smarking.vo.stupaper.QuestionAnswerVo;
9
 import com.xhkjedu.smarking.vo.stupaper.QuestionAnswerVo;
11
 import org.apache.ibatis.annotations.Param;
10
 import org.apache.ibatis.annotations.Param;
12
 
11
 
66
     void saveBatchStuPaperQuestion(@Param("list") List<MsPaperStudentQuestion> list);
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
     List<SQScoreVo> listByMpIds(@Param("mpids") List<Integer> mpids);
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
 
2
 
3
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
 import com.xhkjedu.smarking.mapper.paper.MsPaperAnalyzeMapper;
4
 import com.xhkjedu.smarking.mapper.paper.MsPaperAnalyzeMapper;
5
-import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
6
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentPointMapper;
5
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentPointMapper;
7
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointMapper;
6
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointMapper;
8
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointRankgroupMapper;
7
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointRankgroupMapper;
9
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointSectionMapper;
8
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointSectionMapper;
10
 import com.xhkjedu.smarking.model.exam.MsClassStudent;
9
 import com.xhkjedu.smarking.model.exam.MsClassStudent;
11
-import com.xhkjedu.smarking.model.paper.MsPaper;
12
 import com.xhkjedu.smarking.model.paper.MsPaperAnalyze;
10
 import com.xhkjedu.smarking.model.paper.MsPaperAnalyze;
13
 import com.xhkjedu.smarking.model.paper.MsPaperQtypeQuestion;
11
 import com.xhkjedu.smarking.model.paper.MsPaperQtypeQuestion;
14
 import com.xhkjedu.smarking.model.report.reportstu.MsrStudent;
12
 import com.xhkjedu.smarking.model.report.reportstu.MsrStudent;
17
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointRankgroup;
15
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointRankgroup;
18
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointSection;
16
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectPointSection;
19
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
17
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
20
-import com.xhkjedu.smarking.service.paper.MsPaperAnalyzeService;
21
 import com.xhkjedu.smarking.utils.MarkingUtil;
18
 import com.xhkjedu.smarking.utils.MarkingUtil;
22
 import com.xhkjedu.smarking.vo.paper.QuestionPointVo;
19
 import com.xhkjedu.smarking.vo.paper.QuestionPointVo;
23
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
20
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
52
     private MsrSubjectPointRankgroupMapper msrSubjectPointRankgroupMapper;
49
     private MsrSubjectPointRankgroupMapper msrSubjectPointRankgroupMapper;
53
     @Resource
50
     @Resource
54
     private MsrStudentPointMapper msrStudentPointMapper;
51
     private MsrStudentPointMapper msrStudentPointMapper;
55
-    @Resource
56
-    private MsPaperMapper msPaperMapper;
57
-    @Resource
58
-    private MsPaperAnalyzeService msPaperAnalyzeService;
59
 
52
 
60
     //知识点分析,题库知识点按母题分析
53
     //知识点分析,题库知识点按母题分析
61
     public void generatePoint(List<MsPaperStudentQuestion> stuSubjectQuestions, List<MsPaperQtypeQuestion> qtypeQuestions,List<MsClassStudent> classStus,
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
         MsPaperAnalyze paperAnalyze = msPaperAnalyzeMapper.getObjByMpId(mpid);
57
         MsPaperAnalyze paperAnalyze = msPaperAnalyzeMapper.getObjByMpId(mpid);
65
         if(paperAnalyze == null || N_Utils.isEmpty(paperAnalyze.getPointjson())) return;
58
         if(paperAnalyze == null || N_Utils.isEmpty(paperAnalyze.getPointjson())) return;
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
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
 import com.xhkjedu.smarking.mapper.exam.MsClassStudentMapper;
4
 import com.xhkjedu.smarking.mapper.exam.MsClassStudentMapper;
5
 import com.xhkjedu.smarking.mapper.exam.MsSubjectMapper;
5
 import com.xhkjedu.smarking.mapper.exam.MsSubjectMapper;
6
+import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
6
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
7
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
7
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQobjsubMapper;
8
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQobjsubMapper;
8
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQtypeMapper;
9
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQtypeMapper;
10
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQuestionObjMapper;
11
 import com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQuestionObjMapper;
11
 import com.xhkjedu.smarking.mapper.report.reportother.MsrReportparamMapper;
12
 import com.xhkjedu.smarking.mapper.report.reportother.MsrReportparamMapper;
12
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentMapper;
13
 import com.xhkjedu.smarking.mapper.report.reportstu.MsrStudentMapper;
14
+import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectPointMapper;
13
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionRankgroupMapper;
15
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionRankgroupMapper;
14
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionSectionMapper;
16
 import com.xhkjedu.smarking.mapper.report.reportsubject.MsrSubjectQuestionSectionMapper;
15
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentQuestionMapper;
17
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentQuestionMapper;
25
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionRankgroup;
27
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionRankgroup;
26
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionSection;
28
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubjectQuestionSection;
27
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
29
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
30
+import com.xhkjedu.smarking.service.paper.MsPaperAnalyzeService;
28
 import com.xhkjedu.smarking.utils.MarkingUtil;
31
 import com.xhkjedu.smarking.utils.MarkingUtil;
29
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
32
 import com.xhkjedu.smarking.vo.report.reportother.RankGroupVo;
30
 import com.xhkjedu.smarking.vo.report.reportother.ReportParams;
33
 import com.xhkjedu.smarking.vo.report.reportother.ReportParams;
71
     private MsrSubjectQuestionSectionMapper msrSubjectQuestionSectionMapper;
74
     private MsrSubjectQuestionSectionMapper msrSubjectQuestionSectionMapper;
72
     @Resource
75
     @Resource
73
     private ReportGeneratePointService reportGeneratePointService;
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
     @Transactional(rollbackFor = Exception.class)
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
         List<MsPaper> subjects = msSubjectMapper.listReportSubject(examid, exammode);
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
         List<MsrReportparam> params = msrReportparamMapper.listReportparamByRpbelong(examid, "quesummary", null);
92
         List<MsrReportparam> params = msrReportparamMapper.listReportparamByRpbelong(examid, "quesummary", null);
84
 
93
 
872
             msrClassQuestionMapper.updateBatchQfdById(saveQuestions);
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
         List<MsPaper> subjects = subjectMapper.listReportSubject(examid, exammode);//考试报告科目列表
93
         List<MsPaper> subjects = subjectMapper.listReportSubject(examid, exammode);//考试报告科目列表
94
         if (N_Utils.isListEmpty(subjects)) return;
94
         if (N_Utils.isListEmpty(subjects)) return;
95
         List<MsClass> classes = classMapper.listClassByExamId(examid);//获取考试关联班级
95
         List<MsClass> classes = classMapper.listClassByExamId(examid);//获取考试关联班级
96
-        List<MsClassStudent> students = classStudentMapper.listStudentByExamId(examid);//获取考试关联学生
96
+        List<MsClassStudent> students = classStudentMapper.listStudentByExamId(examid,null);//获取考试关联学生
97
         List<Integer> mpids = new ArrayList<>();
97
         List<Integer> mpids = new ArrayList<>();
98
         for (MsPaper subject : subjects) {
98
         for (MsPaper subject : subjects) {
99
             Integer mpid = subject.getMpid();
99
             Integer mpid = subject.getMpid();

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

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

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

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

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

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

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

329
         sq.qscore,sq.answered,sq.answertype,sq.stuanswer,sq.stuscore,sq.stumerge,sq.hasgood,sq.hasbad
329
         sq.qscore,sq.answered,sq.answertype,sq.stuanswer,sq.stuscore,sq.stumerge,sq.hasgood,sq.hasbad
330
         from ms_paper_student_question sq
330
         from ms_paper_student_question sq
331
         left join ms_paper_student ps on sq.mpsid=ps.mpsid
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
     </select>
335
     </select>
334
     <!--获取参与统计科目单题得分情况-->
336
     <!--获取参与统计科目单题得分情况-->
335
     <resultMap id="subjectScore" type="com.xhkjedu.smarking.vo.paper.SQScoreVo">
337
     <resultMap id="subjectScore" type="com.xhkjedu.smarking.vo.paper.SQScoreVo">

Loading…
Cancel
Save