|
@@ -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
|
}
|