Browse Source

完善模板返回值、调整报告表

ywx
王宁 2 weeks ago
parent
commit
401f521f05
21 changed files with 117 additions and 39 deletions
  1. 2
    2
      smarking/src/main/java/com/xhkjedu/smarking/controller/paper/MsTemplateController.java
  2. 1
    1
      smarking/src/main/java/com/xhkjedu/smarking/controller/report/MsrReportparamController.java
  3. 2
    0
      smarking/src/main/java/com/xhkjedu/smarking/mapper/paper/MsPaperMapper.java
  4. 2
    2
      smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportclass/MsrClassQobjsubMapper.java
  5. 2
    3
      smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportother/MsrReportparamMapper.java
  6. 3
    0
      smarking/src/main/java/com/xhkjedu/smarking/mapper/stupaper/MsPaperStudentQuestionMapper.java
  7. 3
    3
      smarking/src/main/java/com/xhkjedu/smarking/model/report/reportclass/MsrClassQobjsub.java
  8. 6
    2
      smarking/src/main/java/com/xhkjedu/smarking/model/report/reportother/MsrReportparam.java
  9. 2
    0
      smarking/src/main/java/com/xhkjedu/smarking/model/report/reportsubject/MsrSubject.java
  10. 2
    0
      smarking/src/main/java/com/xhkjedu/smarking/model/stupaper/MsPaperStudentQuestion.java
  11. 2
    2
      smarking/src/main/java/com/xhkjedu/smarking/model/wholeparam/MspReportparam.java
  12. 3
    0
      smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsPaperQtypeService.java
  13. 4
    2
      smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsTemplateService.java
  14. 25
    0
      smarking/src/main/java/com/xhkjedu/smarking/service/report/generate/ReportGenerateQuestionService.java
  15. 12
    6
      smarking/src/main/java/com/xhkjedu/smarking/service/report/reportother/MsrReportparamService.java
  16. 18
    0
      smarking/src/main/java/com/xhkjedu/smarking/utils/MarkingUtil.java
  17. 5
    2
      smarking/src/main/java/com/xhkjedu/smarking/vo/report/reportother/ReportParams.java
  18. 7
    0
      smarking/src/main/resources/mapper/paper/MsPaperMapper.xml
  19. 1
    1
      smarking/src/main/resources/mapper/report/reportclass/MsrClassQobjsubMapper.xml
  20. 8
    6
      smarking/src/main/resources/mapper/report/reportother/MsrReportparamMapper.xml
  21. 7
    7
      smarking/src/main/resources/mapper/stupaper/MsPaperStudentQuestionMapper.xml

+ 2
- 2
smarking/src/main/java/com/xhkjedu/smarking/controller/paper/MsTemplateController.java View File

@@ -36,8 +36,8 @@ public class MsTemplateController {
36 36
     @PostMapping("/list")
37 37
     public ResultVo queryList(@RequestBody MsPaper paper) {
38 38
         N_Utils.validation(new Object[]{paper.getMpid(),"试卷id",1});
39
-        List<Map<String,Object>> list = msTemplateService.listTemplatesByMpid(paper.getMpid());
40
-        return new ResultVo(0, "查询成功", list);
39
+        Map<String,Object> rtnMap = msTemplateService.listTemplatesByMpid(paper.getMpid());
40
+        return new ResultVo(0, "查询成功", rtnMap);
41 41
     }
42 42
 
43 43
     /**

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/controller/report/MsrReportparamController.java View File

@@ -52,7 +52,7 @@ public class MsrReportparamController {
52 52
     @PostMapping("/detail")
53 53
     public ResultVo detail(@RequestBody ReportParams gradeparam) {
54 54
         N_Utils.validation(new Object[]{gradeparam.getExamid(), "考试id", 1,gradeparam.getRpbelong(),"归属菜单",2});
55
-        List<MsrReportparam> rtnParams = msrReportparamService.listReportparamByRpbelong(gradeparam.getRpbelong(),gradeparam.getExamid());
55
+        List<MsrReportparam> rtnParams = msrReportparamService.listReportparamByRpbelong(gradeparam);
56 56
         return new ResultVo(0, "获取成功",rtnParams);
57 57
     }
58 58
 }

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/paper/MsPaperMapper.java View File

@@ -69,4 +69,6 @@ public interface MsPaperMapper extends TkMapper<MsPaper> {
69 69
     int updatePaperCutState(@Param("mpid") Integer mpid, @Param("cutstate") Integer cutstate);
70 70
     //获取试卷切割状态
71 71
     Integer getPaperCutStateByMpid(@Param("mpid") Integer mpid);
72
+    //根据试卷ID获取科目名称和考试名称
73
+    Map<String,Object> getSubjectAndExamByMpid(@Param("mpid") Integer mpid);
72 74
 }

smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportclass/MsrClassObjsubMapper.java → smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportclass/MsrClassQobjsubMapper.java View File

@@ -1,12 +1,12 @@
1 1
 package com.xhkjedu.smarking.mapper.report.reportclass;
2 2
 
3 3
 import com.xhkjedu.base.TkMapper;
4
-import com.xhkjedu.smarking.model.report.reportclass.MsrClassObjsub;
4
+import com.xhkjedu.smarking.model.report.reportclass.MsrClassQobjsub;
5 5
 
6 6
 /**
7 7
  * @Description 阅卷报告-班级客主观题分析表 Mapper 接口
8 8
  * @Author auto
9 9
  * @Date 2024-12-09
10 10
  */
11
-public interface MsrClassObjsubMapper extends TkMapper<MsrClassObjsub> {
11
+public interface MsrClassQobjsubMapper extends TkMapper<MsrClassQobjsub> {
12 12
 }

+ 2
- 3
smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportother/MsrReportparamMapper.java View File

@@ -2,6 +2,7 @@ package com.xhkjedu.smarking.mapper.report.reportother;
2 2
 
3 3
 import com.xhkjedu.base.TkMapper;
4 4
 import com.xhkjedu.smarking.model.report.reportother.MsrReportparam;
5
+import com.xhkjedu.smarking.vo.report.reportother.ReportParams;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 
7 8
 import java.util.List;
@@ -14,10 +15,8 @@ import java.util.List;
14 15
 public interface MsrReportparamMapper extends TkMapper<MsrReportparam> {
15 16
 
16 17
     //获取考试指定图例对应参数
17
-    List<MsrReportparam> listReportparamByRpbelong(@Param("rpbelong") String rpbelong,@Param("examid") Integer examid);
18
+    List<MsrReportparam> listReportparamByRpbelong(@Param("rp") ReportParams reportParams);
18 19
 
19 20
     //批量删除
20 21
     int deleteBatchReportparam(@Param("list") List<Integer> list);
21
-
22
-    int getCountByExamid(@Param("examid") Integer examid);
23 22
 }

+ 3
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/stupaper/MsPaperStudentQuestionMapper.java View File

@@ -62,4 +62,7 @@ public interface MsPaperStudentQuestionMapper extends TkMapper<MsPaperStudentQue
62 62
     List<MsPaperStudentQuestion> listNoMergeStupic();
63 63
     //批量保存学生试题
64 64
     void saveBatchStuPaperQuestion(@Param("list") List<MsPaperStudentQuestion> list);
65
+
66
+    //获取考试所有参考学生作答情况
67
+    List<MsPaperStudentQuestion> listAllStuQuesByExamid(@Param("examid") Integer examid);
65 68
 }

smarking/src/main/java/com/xhkjedu/smarking/model/report/reportclass/MsrClassObjsub.java → smarking/src/main/java/com/xhkjedu/smarking/model/report/reportclass/MsrClassQobjsub.java View File

@@ -12,8 +12,8 @@ import javax.persistence.Table;
12 12
  * @Date 2024-12-09
13 13
  */
14 14
 @Data
15
-@Table(name = "msr_class_objsub")
16
-public class MsrClassObjsub extends BaseBean {
15
+@Table(name = "msr_class_qobjsub")
16
+public class MsrClassQobjsub extends BaseBean {
17 17
     @Id
18 18
     //阅卷报告-班级客主观题分析
19 19
     private Integer coid;
@@ -22,7 +22,7 @@ public class MsrClassObjsub extends BaseBean {
22 22
     //班级ID
23 23
     private Integer classid;
24 24
     //类型1客观题2主观题
25
-    private Integer cotype;
25
+    private Integer qtype;
26 26
     //满分
27 27
     private Double fullscore;
28 28
     //最高分

+ 6
- 2
smarking/src/main/java/com/xhkjedu/smarking/model/report/reportother/MsrReportparam.java View File

@@ -19,8 +19,12 @@ public class MsrReportparam extends BaseBean {
19 19
     private Integer rpid;
20 20
     //考试ID
21 21
     private Integer examid;
22
-    //归属:allrate班级对比表综合率  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现
23
-    //  keystu重点学生信息
22
+
23
+    //归属报告模块编码:zh综合报告 xj校级报告 xk学科报告 bj班级报告 xs学生报告 mtzl命题质量报告 jxzl教学质量报告 xksy学科素养报告
24
+    private String reportcode;
25
+
26
+    //归属:rank排行榜 scorerate班级对比得分率 allrate班级对比表综合率  allrate班级对比表综合率 quesummary试题汇总 scoresection分数分段统计
27
+    // rankrate名次和比例分析  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现 keystu重点学生信息
24 28
     private String rpbelong;
25 29
     //类型
26 30
     private Integer rptype;

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/report/reportsubject/MsrSubject.java View File

@@ -45,6 +45,8 @@ public class MsrSubject extends BaseBean {
45 45
     private Double cyxs;
46 46
     //难度
47 47
     private Double nd;
48
+    //区分度
49
+    private Double qfd;
48 50
     //α信度系数
49 51
     private Double axdxs;
50 52
     //学科评价得分率离差

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/stupaper/MsPaperStudentQuestion.java View File

@@ -115,4 +115,6 @@ public class MsPaperStudentQuestion extends BaseBean {
115 115
     private String qanswer;//试题正确答案
116 116
     @Transient
117 117
     private Integer qtype;//类型1客观题2主观题
118
+    @Transient
119
+    private String mptqn;//题型题号
118 120
 }

+ 2
- 2
smarking/src/main/java/com/xhkjedu/smarking/model/wholeparam/MspReportparam.java View File

@@ -19,8 +19,8 @@ public class MspReportparam extends BaseBean {
19 19
     private Integer rpid;
20 20
     //年级 0通用
21 21
     private Integer gradeid;
22
-    //归属:allrate班级对比表综合率  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现
23
-    //  keystu重点学生信息
22
+    //归属:rank排行榜 scorerate班级对比得分率 allrate班级对比表综合率  allrate班级对比表综合率 quesummary试题汇总 scoresection分数分段统计
23
+    // rankrate名次和比例分析  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现 keystu重点学生信息
24 24
     private String rpbelong;
25 25
     //类型
26 26
     private Integer rptype;

+ 3
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsPaperQtypeService.java View File

@@ -175,6 +175,9 @@ public class MsPaperQtypeService {
175 175
             qtype.setCreateid(paper.getHandleid());
176 176
             qtype.setCreatetime(paper.getHandletime());
177 177
             qtype.setMptname(N_Utils.strTrim(qtype.getMptname()));
178
+            if(N_Utils.isEmpty(qtype.getMptqn())){
179
+                qtype.setMptqn(MarkingUtil.getQnByOrder(qtype.getMptorder()));
180
+            }
178 181
         }
179 182
         msPaperQtypeMapper.insertList(qtypelist);// 保存题型
180 183
         List<MsPaperQtypeQuestion> qtqs = new ArrayList<>();

+ 4
- 2
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsTemplateService.java View File

@@ -69,8 +69,10 @@ public class MsTemplateService {
69 69
      * @Param [getMpid]
70 70
      * @Return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
71 71
      **/
72
-    public List<Map<String, Object>> listTemplatesByMpid(Integer getMpid){
73
-        return msTemplateMapper.listTemplatesByMpid(getMpid);
72
+    public Map<String,Object> listTemplatesByMpid(Integer mpid){
73
+        Map<String,Object> rtnMap = msPaperMapper.getSubjectAndExamByMpid(mpid);
74
+        rtnMap.put("list",msTemplateMapper.listTemplatesByMpid(mpid));
75
+        return rtnMap;
74 76
     }
75 77
 
76 78
     /**

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

@@ -0,0 +1,25 @@
1
+package com.xhkjedu.smarking.service.report.generate;
2
+
3
+import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentQuestionMapper;
4
+import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
5
+import org.springframework.stereotype.Service;
6
+
7
+import javax.annotation.Resource;
8
+import java.util.List;
9
+
10
+/**
11
+ * @Description:试题对应报告内容
12
+ * @Author: WN
13
+ * @Date: 2024/12/10 10:18:26
14
+ **/
15
+@Service
16
+public class ReportGenerateQuestionService {
17
+    @Resource
18
+    private MsPaperStudentQuestionMapper msPaperStudentQuestionMapper;
19
+
20
+    public void generateQuestion(Integer examid){
21
+        //查询所有学生试题
22
+        List<MsPaperStudentQuestion> stuQuestions = msPaperStudentQuestionMapper.listAllStuQuesByExamid(examid);
23
+
24
+    }
25
+}

+ 12
- 6
smarking/src/main/java/com/xhkjedu/smarking/service/report/reportother/MsrReportparamService.java View File

@@ -37,7 +37,7 @@ public class MsrReportparamService {
37 37
      **/
38 38
     @Transactional(rollbackFor = Exception.class)
39 39
     public void saveReportparam(ReportParams reportParams) {
40
-        List<MsrReportparam> originalParams = msrReportparamMapper.listReportparamByRpbelong(reportParams.getRpbelong(), reportParams.getExamid());
40
+        List<MsrReportparam> originalParams = msrReportparamMapper.listReportparamByRpbelong(reportParams);
41 41
 
42 42
         Integer timestamp = N_Utils.getSecondTimestamp();
43 43
         List<MsrReportparam> params = reportParams.getParams();
@@ -77,8 +77,8 @@ public class MsrReportparamService {
77 77
      * @Param [rpbelong, examid]
78 78
      * @Return java.util.List<com.xhkjedu.smarking.model.report.reportother.MsrReportparam>
79 79
      **/
80
-    public List<MsrReportparam> listReportparamByRpbelong(String rpbelong, Integer examid) {
81
-        return msrReportparamMapper.listReportparamByRpbelong(rpbelong, examid);
80
+    public List<MsrReportparam> listReportparamByRpbelong(ReportParams reportParams) {
81
+        return msrReportparamMapper.listReportparamByRpbelong(reportParams);
82 82
     }
83 83
 
84 84
     /*
@@ -88,10 +88,15 @@ public class MsrReportparamService {
88 88
      * @Param [schoolid, gradeid, examid, handleid]
89 89
      * @Return void
90 90
      **/
91
-    public void initReportparam(Integer schoolid,Integer gradeid,Integer examid,Integer handleid) {
91
+    public List<MsrReportparam> initReportparam(Integer schoolid,Integer gradeid,Integer examid,Integer handleid) {
92 92
         //初始化时判断参数是否已经存在
93
-        int count = msrReportparamMapper.getCountByExamid(examid);
94
-        if(count > 0) return;//如果已有参数不再重新保存参数
93
+        ReportParams ep = new ReportParams();
94
+        ep.setExamid(examid);
95
+        List<MsrReportparam> examParams = msrReportparamMapper.listReportparamByRpbelong(ep);
96
+        if(examParams!= null && examParams.size() > 0){
97
+            //说明考试已经有参数存在
98
+            return examParams;
99
+        }
95 100
 
96 101
         List<MspReportparam> mspParams = mspReportparamMapper.listAllByGrade(schoolid,gradeid);
97 102
         List<MsrReportparam> saveParams = new ArrayList<>();
@@ -121,5 +126,6 @@ public class MsrReportparamService {
121 126
             }
122 127
         }
123 128
         msrReportparamMapper.insertList(saveParams);
129
+        return saveParams;
124 130
     }
125 131
 }

+ 18
- 0
smarking/src/main/java/com/xhkjedu/smarking/utils/MarkingUtil.java View File

@@ -363,6 +363,24 @@ public class MarkingUtil {
363 363
         return result;
364 364
     }
365 365
 
366
+    public static String[] qnArr = {"一","二","三","四","五","六","七","八","九","十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十",
367
+            "二十一","二十二","二十三","二十四","二十五","二十六","二十七","二十八","二十九","三十"};
368
+
369
+    //获取题号
370
+    public static String getQnByOrder(Integer qorder){
371
+        String rtnStr;
372
+        if(qorder == null || qorder == 0 || qorder > 30){
373
+            rtnStr = qnArr[0];
374
+        }
375
+        rtnStr = qnArr[qorder-1];
376
+        return rtnStr;
377
+    }
378
+
379
+
380
+
381
+
382
+
383
+
366 384
     public static void main(String[] args) {
367 385
         String str = "ADAC-D-(C)(AB)(CD)(ACB)BB";
368 386
 

+ 5
- 2
smarking/src/main/java/com/xhkjedu/smarking/vo/report/reportother/ReportParams.java View File

@@ -15,8 +15,11 @@ public class ReportParams {
15 15
     //考试ID
16 16
     private Integer examid;
17 17
 
18
-    //归属:allrate班级对比表综合率  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现
19
-    //  keystu重点学生信息
18
+    //归属报告模块编码:zh综合报告 xj校级报告 xk学科报告 bj班级报告 xs学生报告 mtzl命题质量报告 jxzl教学质量报告 xksy学科素养报告
19
+    private String reportcode;
20
+
21
+    //归属:rank排行榜 scorerate班级对比得分率 allrate班级对比表综合率  allrate班级对比表综合率 quesummary试题汇总 scoresection分数分段统计
22
+    // rankrate名次和比例分析  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现 keystu重点学生信息
20 23
     private String rpbelong;
21 24
 
22 25
     //操作人ID

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

@@ -122,4 +122,11 @@
122 122
     <select id="getPaperCutStateByMpid" resultType="java.lang.Integer">
123 123
         select cutstate from ms_paper where mpid=#{mpid}
124 124
     </select>
125
+    <!--根据试卷ID获取科目名称和考试名称-->
126
+    <select id="getSubjectAndExamByMpid" resultType="java.util.Map">
127
+        select distinct s.msid,s.subjectname,e.examid,e.examname
128
+        from ms_subject s left join ms_exam e on s.examid=e.examid
129
+        left join ms_paper p on s.msid=p.msid
130
+        where p.mpid=#{mpid}
131
+    </select>
125 132
 </mapper>

smarking/src/main/resources/mapper/report/reportclass/MsrClassObjsubMapper.xml → smarking/src/main/resources/mapper/report/reportclass/MsrClassQobjsubMapper.xml View File

@@ -1,4 +1,4 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.xhkjedu.smarking.mapper.report.reportclass.MsrClassObjsubMapper">
3
+<mapper namespace="com.xhkjedu.smarking.mapper.report.reportclass.MsrClassQobjsubMapper">
4 4
 </mapper>

+ 8
- 6
smarking/src/main/resources/mapper/report/reportother/MsrReportparamMapper.xml View File

@@ -4,7 +4,14 @@
4 4
 
5 5
     <!--获取考试对应参数-->
6 6
     <select id="listReportparamByRpbelong" resultType="com.xhkjedu.smarking.model.report.reportother.MsrReportparam">
7
-        select * from msr_reportparam where examid=#{examid} and rpbelong = #{rpbelong}
7
+        select * from msr_reportparam where examid=#{rp.examid}
8
+        <if test="rp.rpbelong!= null and rp.rpbelong!= ''">
9
+            and rpbelong = #{rp.rpbelong}
10
+        </if>
11
+        <if test="rp.reportcode!= null and rp.reportcode!= ''">
12
+            and reportcode = #{rp.reportcode}
13
+        </if>
14
+        order by rpid
8 15
     </select>
9 16
 
10 17
     <!--删除-->
@@ -12,9 +19,4 @@
12 19
         delete from msp_reportparam where rpid in
13 20
         <foreach collection="list" item="rpid" open="(" separator="," close=")">#{rpid}</foreach>
14 21
     </delete>
15
-
16
-    <!--获取考试参数-->
17
-    <select id="getCountByExamid" resultType="java.lang.Integer">
18
-        select count(*) from msr_reportparam where examid = #{examid}
19
-    </select>
20 22
 </mapper>

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

@@ -328,14 +328,14 @@
328 328
         </foreach>
329 329
     </insert>
330 330
 
331
-    <!--获取考试对应的所有参考学生考试信息-->
332
-    <select id="listAllStuQues" resultType="com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion">
333
-        select sq.mpsqid,sq.studentid,sq.subjectid,sq.mpid,sq.mpsid,sq.mptqid,sq.ctype,sq.questionid,
334
-               sq.qn,sq.qorder,sq.qscore,sq.answered,sq.answertype,sq.stuanswer,sq.converted,sq.answertime,
335
-               sq.costtime,sq.checked,sq.stuscore,sq.stumerge,sq.hasgood,sq.hasbad,q.qtype,q.qanswer
331
+    <!--获取考试所有参考学生作答情况-->
332
+    <select id="listAllStuQuesByExamid" resultType="com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion">
333
+        select sq.mpsqid,sq.studentid,sq.subjectid,sq.mpid,sq.mpsid,sq.mptid,sq.mptqid,sq.ctype,sq.questionid,sq.qn,sq.qorder,
334
+        sq.qscore,sq.answered,sq.answertype,sq.stuanswer,sq.stuscore,sq.stumerge,sq.hasgood,sq.hasbad,q.qtype,q.qanswer,qt.mptqn
336 335
         from ms_paper_student_question sq
337
-                 left join ms_paper_student ps on sq.mpsid=ps.mpsid
338
-                 left join ms_paper_qtype_question q on sq.mptqid=q.mptqid
336
+        left join ms_paper_student ps on sq.mpsid=ps.mpsid
337
+        left join ms_paper_qtype_question q on sq.mptqid=q.mptqid
338
+        left join ms_paper_qtype qt on q.mptid=qt.mptid
339 339
         where sq.examid=#{examid} and ps.sstate=2 order by sq.mpid,sq.studentid
340 340
     </select>
341 341
 </mapper>

Loading…
Cancel
Save