Pārlūkot izejas kodu

阅卷指标参数

ywx
王宁 pirms 3 nedēļām
vecāks
revīzija
2cb4f582ad

+ 67
- 0
smarking/src/main/java/com/xhkjedu/smarking/controller/wholeparam/MspGradeparamController.java Parādīt failu

@@ -0,0 +1,67 @@
1
+package com.xhkjedu.smarking.controller.wholeparam;
2
+
3
+import com.xhkjedu.smarking.model.wholeparam.MspGradeparam;
4
+import com.xhkjedu.smarking.service.wholeparam.MspGradeparamService;
5
+import com.xhkjedu.smarking.vo.wholeparam.GradeParams;
6
+import com.xhkjedu.utils.N_Utils;
7
+import com.xhkjedu.vo.ResultVo;
8
+import org.springframework.web.bind.annotation.PostMapping;
9
+import org.springframework.web.bind.annotation.RequestBody;
10
+import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RestController;
12
+
13
+import javax.annotation.Resource;
14
+import java.util.List;
15
+
16
+/**
17
+ * @Description:阅卷指标参数-等级类
18
+ * @Author: WN
19
+ * @Date: 2024/12/2 16:46:46
20
+ **/
21
+@RestController
22
+@RequestMapping("/gparam")
23
+public class MspGradeparamController {
24
+    @Resource
25
+    private MspGradeparamService mspGradeparamService;
26
+
27
+    /*
28
+     * @Description 保存
29
+     * @Date 2024/12/2 17:02:16
30
+     * @Author WN
31
+     * @Param [mspGradeparam]
32
+     * @Return com.xhkjedu.vo.ResultVo
33
+     **/
34
+    @PostMapping("/save")
35
+    public ResultVo save(@RequestBody GradeParams gradeparam) {
36
+        N_Utils.validation(new Object[]{gradeparam.getSchoolid(), "学校id", 1,gradeparam.getGpbelong(),"归属菜单",2});
37
+        if(gradeparam.getGradeid() == null){
38
+            return new ResultVo(1, "年级不能为空");
39
+        }
40
+        if(gradeparam.getParams() == null || gradeparam.getParams().isEmpty()){
41
+            return new ResultVo(1, "参数不能为空");
42
+        }
43
+
44
+        mspGradeparamService.saveGradeparam(gradeparam);
45
+        return new ResultVo(0, "保存成功",gradeparam);
46
+    }
47
+
48
+    /* 获取详情
49
+     * @Description
50
+     * @Date 2024/12/2 17:04:11
51
+     * @Author WN
52
+     * @Param [mspGradeparam]
53
+     * @Return com.xhkjedu.vo.ResultVo
54
+     **/
55
+    @PostMapping("/detail")
56
+    public ResultVo detail(@RequestBody GradeParams gradeparam) {
57
+        N_Utils.validation(new Object[]{gradeparam.getSchoolid(), "学校id", 1,gradeparam.getGpbelong(),"归属菜单",2});
58
+        if(gradeparam.getGradeid() == null){
59
+            return new ResultVo(1, "年级不能为空");
60
+        }
61
+        List<MspGradeparam> rtnParams = mspGradeparamService.getMspGradeparam(gradeparam);
62
+        return new ResultVo(0, "保存成功",rtnParams);
63
+    }
64
+
65
+
66
+
67
+}

+ 21
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/wholeparam/MspGradeparamMapper.java Parādīt failu

@@ -0,0 +1,21 @@
1
+package com.xhkjedu.smarking.mapper.wholeparam;
2
+
3
+import com.xhkjedu.base.TkMapper;
4
+import com.xhkjedu.smarking.model.wholeparam.MspGradeparam;
5
+import com.xhkjedu.smarking.vo.wholeparam.GradeParams;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * @Description:阅卷指标参数-等级类参数表
12
+ * @Author: WN
13
+ * @Date: 2024/12/2 16:14:48
14
+ **/
15
+public interface MspGradeparamMapper extends TkMapper<MspGradeparam> {
16
+
17
+    //获取学校年级下指定模块参数
18
+    List<MspGradeparam> getGradeParamByGradeAndBelong(@Param("gp") GradeParams gp);
19
+    //删除
20
+    int deleteGradeparam(@Param("gp")GradeParams gp);
21
+}

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/paper/MsPaperQtype.java Parādīt failu

@@ -23,6 +23,8 @@ public class MsPaperQtype extends BaseBean {
23 23
     private Integer mpid;
24 24
     //处理题型
25 25
     private Integer ctype;
26
+    //题型题号
27
+    private String mptqn;
26 28
     //题型名称
27 29
     private String mptname;
28 30
     //题型下试题数量

+ 40
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/wholeparam/MspGradeparam.java Parādīt failu

@@ -0,0 +1,40 @@
1
+package com.xhkjedu.smarking.model.wholeparam;
2
+
3
+import com.xhkjedu.model.BaseBean;
4
+import lombok.Data;
5
+
6
+import javax.persistence.Id;
7
+import javax.persistence.Table;
8
+
9
+/**
10
+ * @Description 阅卷指标参数-等级类参数表
11
+ * @Author auto
12
+ * @Date 2024-12-02
13
+ */
14
+@Data
15
+@Table(name = "msp_gradeparam")
16
+public class MspGradeparam extends BaseBean {
17
+    @Id
18
+    //等级类参数ID
19
+    private Integer gpid;
20
+    //年级 0通用
21
+    private Integer gradeid;
22
+    //归属:allrate班级对比表综合率  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现
23
+    //  keystu重点学生信息
24
+    private String gpbelong;
25
+    //类型
26
+    private Integer gptype;
27
+    //等级值
28
+    private Integer gradenum;
29
+    //科目ID
30
+    private String subjectid;
31
+    //数值json
32
+    private String szjson;
33
+    //操作人ID
34
+    private Integer handleid;
35
+    //操作时间
36
+    private Integer handletime;
37
+
38
+    //学校ID
39
+    private Integer schoolid;
40
+}

+ 1
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsPaperQtypeService.java Parādīt failu

@@ -1170,6 +1170,7 @@ public class MsPaperQtypeService {
1170 1170
 
1171 1171
             Map<String,Object> typeMap = new TreeMap<>();
1172 1172
             typeMap.put("mptid",qtypeVo.getMptid());
1173
+            typeMap.put("mptqn",qtypeVo.getMptqn());
1173 1174
             typeMap.put("mptname",qtypeVo.getMptname());
1174 1175
             typeMap.put("mptorder",qtypeVo.getMptorder());
1175 1176
             typeMap.put("mptnum",qtypeVo.getMptnum());

+ 63
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/wholeparam/MspGradeparamService.java Parādīt failu

@@ -0,0 +1,63 @@
1
+package com.xhkjedu.smarking.service.wholeparam;
2
+
3
+import com.xhkjedu.smarking.mapper.wholeparam.MspGradeparamMapper;
4
+import com.xhkjedu.smarking.model.wholeparam.MspGradeparam;
5
+import com.xhkjedu.smarking.vo.wholeparam.GradeParams;
6
+import com.xhkjedu.utils.N_Utils;
7
+import org.springframework.stereotype.Service;
8
+import org.springframework.transaction.annotation.Transactional;
9
+
10
+import javax.annotation.Resource;
11
+import java.util.List;
12
+
13
+/**
14
+ * @Description:阅卷指标参数-等级类
15
+ * @Author: WN
16
+ * @Date: 2024/12/2 16:19:44
17
+ **/
18
+@Service
19
+public class MspGradeparamService {
20
+    @Resource
21
+    private MspGradeparamMapper mspGradeparamMapper;
22
+
23
+    /*
24
+     * @Description 保存等级参数
25
+     * @Date 2024/12/2 16:46:10
26
+     * @Author WN
27
+     * @Param [mspGradeparam]
28
+     * @Return void
29
+     **/
30
+    @Transactional(rollbackFor = Exception.class)
31
+    public void saveGradeparam(GradeParams gradeParams) {
32
+        List<MspGradeparam> originalParams = mspGradeparamMapper.getGradeParamByGradeAndBelong(gradeParams);
33
+
34
+        if(originalParams!= null && originalParams.size() > 0) {
35
+            mspGradeparamMapper.deleteGradeparam(gradeParams);
36
+        }
37
+
38
+        Integer timestamp = N_Utils.getSecondTimestamp();
39
+        List<MspGradeparam> params = gradeParams.getParams();
40
+        for(MspGradeparam param : params) {
41
+            param.setGpbelong(gradeParams.getGpbelong());
42
+            param.setGradeid(gradeParams.getGradeid());
43
+            param.setHandleid(gradeParams.getHandleid());
44
+            param.setSchoolid(gradeParams.getSchoolid());
45
+            param.setHandletime(timestamp);
46
+            if(param.getGptype() == null) param.setGptype(0);
47
+            if(param.getGradenum() == null) param.setGradenum(0);
48
+        }
49
+        mspGradeparamMapper.insertList(params);
50
+
51
+    }
52
+
53
+    /*
54
+     * @Description 保存等级参数
55
+     * @Date 2024/12/2 16:46:15
56
+     * @Author WN
57
+     * @Param [mspGradeparam]
58
+     * @Return com.xhkjedu.smarking.model.wholeparam.MspGradeparam
59
+     **/
60
+    public List<MspGradeparam> getMspGradeparam(GradeParams mspGradeparam) {
61
+        return mspGradeparamMapper.getGradeParamByGradeAndBelong(mspGradeparam);
62
+    }
63
+}

+ 3
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/paper/MsPaperQtypeVo.java Parādīt failu

@@ -18,6 +18,9 @@ public class MsPaperQtypeVo {
18 18
 
19 19
     private Integer ctype;
20 20
 
21
+    //题型题号
22
+    private String mptqn;
23
+
21 24
     //题型名称
22 25
     private String mptname;
23 26
 

+ 29
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/wholeparam/GradeParams.java Parādīt failu

@@ -0,0 +1,29 @@
1
+package com.xhkjedu.smarking.vo.wholeparam;
2
+
3
+import com.xhkjedu.smarking.model.wholeparam.MspGradeparam;
4
+import lombok.Data;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * @Description:参数
10
+ * @Author: WN
11
+ * @Date: 2024/12/3 9:41:33
12
+ **/
13
+
14
+@Data
15
+public class GradeParams {
16
+
17
+    //年级 0通用
18
+    private Integer gradeid;
19
+    //归属:allrate班级对比表综合率  gradescore分档分数线 nearline临界生群体分析 subjectshow学科考试表现
20
+    //  keystu重点学生信息
21
+    private String gpbelong;
22
+    //操作人ID
23
+    private Integer handleid;
24
+
25
+    //学校ID
26
+    private Integer schoolid;
27
+
28
+    private List<MspGradeparam> params;//所有参数集合
29
+}

+ 69
- 66
smarking/src/main/resources/mapper/paper/MsPaperQtypeMapper.xml Parādīt failu

@@ -9,47 +9,48 @@
9 9
 
10 10
     <!--试卷题型试题信息(题库)-->
11 11
     <resultMap id="qtypesQuestion" type="com.xhkjedu.smarking.vo.paper.MsPaperQtypeVo">
12
-        <result column="mptid" property="mptid"></result>
13
-        <result column="mpid" property="mpid"></result>
14
-        <result column="mptname" property="mptname"></result>
15
-        <result column="mptnum" property="mptnum"></result>
16
-        <result column="mptorder" property="mptorder"></result>
17
-        <result column="mptscore" property="mptscore"></result>
12
+        <result column="mptid" property="mptid" />
13
+        <result column="mpid" property="mpid" />
14
+        <result column="mptqn" property="mptqn" />
15
+        <result column="mptname" property="mptname" />
16
+        <result column="mptnum" property="mptnum" />
17
+        <result column="mptorder" property="mptorder" />
18
+        <result column="mptscore" property="mptscore" />
18 19
         <collection property="questions" ofType="com.xhkjedu.smarking.vo.paper.MsPaperQtypeQuestionVo" javaType="java.util.List">
19
-            <result column="mptqid" property="mptqid"></result>
20
-            <result column="mptid" property="mptid"></result>
21
-            <result column="questionid" property="questionid"></result>
22
-            <result column="qscore" property="qscore"></result>
23
-            <result column="qorder" property="qorder"></result>
24
-            <result column="qn" property="qn"></result>
25
-            <result column="qtypeid" property="qtypeid"></result>
26
-            <result column="qtypename" property="qtypename"></result>
27
-            <result column="answer" property="answer"></result>
28
-            <result column="qctype" property="ctype"></result>
29
-            <result column="qstem" property="qstem"></result>
30
-            <result column="qstemtxt" property="qstemtxt"></result>
31
-            <result column="qoption" property="qoption"></result>
32
-            <result column="qanswer" property="qanswer"></result>
33
-            <result column="qanalyze" property="qanalyze"></result>
34
-            <result column="complexity" property="complexity"></result>
35
-            <result column="hashear" property="hashear"></result>
36
-            <result column="hearfile" property="hearfile"></result>
37
-            <result column="qlevel" property="qlevel"></result>
38
-            <result column="sorder" property="sorder"></result>
39
-            <result column="snum" property="snum"></result>
40
-            <result column="questionpid" property="questionpid"></result>
41
-            <result column="mqstem" property="mqstem"></result>
42
-            <result column="mcomplexity" property="mcomplexity"></result>
43
-            <result column="mqtypeid" property="mqtypeid"></result>
44
-            <result column="mqtypename" property="mqtypename"></result>
45
-            <result column="mctype" property="mctype"></result>
46
-            <result column="mqanswer" property="mqanswer"></result>
47
-            <result column="mqanalyze" property="mqanalyze"></result>
48
-            <result column="mqlevel" property="mqlevel"></result>
49
-            <result column="mhashear" property="mhashear"></result>
50
-            <result column="mhearfile" property="mhearfile"></result>
51
-            <result column="loseoption" property="loseoption"></result>
52
-            <result column="scoreset" property="scoreset"></result>
20
+            <result column="mptqid" property="mptqid" />
21
+            <result column="mptid" property="mptid" />
22
+            <result column="questionid" property="questionid" />
23
+            <result column="qscore" property="qscore" />
24
+            <result column="qorder" property="qorder" />
25
+            <result column="qn" property="qn" />
26
+            <result column="qtypeid" property="qtypeid" />
27
+            <result column="qtypename" property="qtypename" />
28
+            <result column="answer" property="answer" />
29
+            <result column="qctype" property="ctype" />
30
+            <result column="qstem" property="qstem" />
31
+            <result column="qstemtxt" property="qstemtxt" />
32
+            <result column="qoption" property="qoption" />
33
+            <result column="qanswer" property="qanswer" />
34
+            <result column="qanalyze" property="qanalyze" />
35
+            <result column="complexity" property="complexity" />
36
+            <result column="hashear" property="hashear" />
37
+            <result column="hearfile" property="hearfile" />
38
+            <result column="qlevel" property="qlevel" />
39
+            <result column="sorder" property="sorder" />
40
+            <result column="snum" property="snum" />
41
+            <result column="questionpid" property="questionpid" />
42
+            <result column="mqstem" property="mqstem" />
43
+            <result column="mcomplexity" property="mcomplexity" />
44
+            <result column="mqtypeid" property="mqtypeid" />
45
+            <result column="mqtypename" property="mqtypename" />
46
+            <result column="mctype" property="mctype" />
47
+            <result column="mqanswer" property="mqanswer" />
48
+            <result column="mqanalyze" property="mqanalyze" />
49
+            <result column="mqlevel" property="mqlevel" />
50
+            <result column="mhashear" property="mhashear" />
51
+            <result column="mhearfile" property="mhearfile" />
52
+            <result column="loseoption" property="loseoption" />
53
+            <result column="scoreset" property="scoreset" />
53 54
             <collection property="points" ofType="java.util.Map" javaType="java.util.List"
54 55
                         column="{questionid=questionid,qlevel=qlevel,questionpid=questionpid}" select="listQuestionPoints">
55 56
                 <result column="pointid" property="pointid"></result>
@@ -59,7 +60,7 @@
59 60
     </resultMap>
60 61
     <!--试题详情-->
61 62
     <select id="listPaperQtypeQuestions" resultMap="qtypesQuestion">
62
-        select t.mptid,t.mpid,t.mptname,t.mptnum,t.mptorder,t.mptscore,tq.mptqid,tq.questionid,tq.qanswer as answer,tq.qscore,tq.qn,
63
+        select t.mptid,t.mpid,t.mptqn,t.mptname,t.mptnum,t.mptorder,t.mptscore,tq.mptqid,tq.questionid,tq.qanswer as answer,tq.qscore,tq.qn,
63 64
         tq.qorder,tq.loseoption,tq.scoreset,COALESCE(tq.complexity, q.complexity) as complexity,q.qtypeid,q.qtypename,q.ctype qctype,
64 65
         q.qstem,q.qstemtxt,q.qoption,q.qanswer,q.qanalyze,q.hashear,q.hearfile,q.qlevel,q.sorder,q.questionpid,
65 66
         fq.snum,fq.qstem as mqstem,fq.complexity as mcomplexity,fq.qtypeid mqtypeid,fq.qtypename mqtypename,fq.ctype mctype,
@@ -85,36 +86,37 @@
85 86
 
86 87
     <!--试卷题型试题信息(附件)-->
87 88
     <resultMap id="fjtypeQuestions" type="com.xhkjedu.smarking.vo.paper.MsPaperQtypeVo">
88
-        <result column="mptid" property="mptid"></result>
89
-        <result column="mpid" property="mpid"></result>
90
-        <result column="mptname" property="mptname"></result>
91
-        <result column="mptnum" property="mptnum"></result>
92
-        <result column="mptorder" property="mptorder"></result>
93
-        <result column="mptscore" property="mptscore"></result>
94
-        <result column="mptctype" property="ctype"></result>
89
+        <result column="mptid" property="mptid" />
90
+        <result column="mpid" property="mpid" />
91
+        <result column="mptqn" property="mptqn" />
92
+        <result column="mptname" property="mptname" />
93
+        <result column="mptnum" property="mptnum" />
94
+        <result column="mptorder" property="mptorder" />
95
+        <result column="mptscore" property="mptscore" />
96
+        <result column="mptctype" property="ctype" />
95 97
         <collection property="questions" ofType="com.xhkjedu.smarking.vo.paper.MsPaperQtypeQuestionVo" javaType="java.util.List">
96
-            <result column="mptqid" property="mptqid"></result>
97
-            <result column="mptid" property="mptid"></result>
98
-            <result column="qscore" property="qscore"></result>
99
-            <result column="qorder" property="qorder"></result>
100
-            <result column="qtypeid" property="qtypeid"></result>
101
-            <result column="qtypename" property="qtypename"></result>
102
-            <result column="ctype" property="ctype"></result>
103
-            <result column="qn" property="qn"></result>
104
-            <result column="optionnum" property="optionnum"></result>
105
-            <result column="qanswer" property="qanswer"></result>
106
-            <result column="complexity" property="complexity"></result>
107
-            <result column="loseoption" property="loseoption"></result>
108
-            <result column="scoreset" property="scoreset"></result>
98
+            <result column="mptqid" property="mptqid" />
99
+            <result column="mptid" property="mptid" />
100
+            <result column="qscore" property="qscore" />
101
+            <result column="qorder" property="qorder" />
102
+            <result column="qtypeid" property="qtypeid" />
103
+            <result column="qtypename" property="qtypename" />
104
+            <result column="ctype" property="ctype" />
105
+            <result column="qn" property="qn" />
106
+            <result column="optionnum" property="optionnum" />
107
+            <result column="qanswer" property="qanswer" />
108
+            <result column="complexity" property="complexity" />
109
+            <result column="loseoption" property="loseoption" />
110
+            <result column="scoreset" property="scoreset" />
109 111
             <collection property="points" ofType="java.util.Map" javaType="java.util.List"
110 112
                         column="{mptqid=mptqid}" select="listQuestionPointsFj">
111
-                <result column="pointid" property="pointid"></result>
112
-                <result column="pointname" property="pointname"></result>
113
+                <result column="pointid" property="pointid" />
114
+                <result column="pointname" property="pointname" />
113 115
             </collection>
114 116
         </collection>
115 117
     </resultMap>
116 118
     <select id="listPaperQtypeQuesitonsForFj" resultMap="fjtypeQuestions">
117
-        select  t.mptid,t.mpid,t.ctype as mptctype,t.mptname,t.mptnum,t.mptorder,t.mptscore,q.mptqid,q.qtypeid,q.qtypename,
119
+        select  t.mptid,t.mpid,t.ctype as mptctype,t.mptqn,t.mptname,t.mptnum,t.mptorder,t.mptscore,q.mptqid,q.qtypeid,q.qtypename,
118 120
                 q.ctype,q.qscore,q.qn,q.qorder,q.optionnum,q.qanswer,q.optionnum,q.complexity,q.loseoption,q.scoreset
119 121
         from ms_paper_qtype_question q left join ms_paper_qtype t on t.mptid=q.mptid
120 122
         where t.mpid=#{mpid} order by t.mptorder,q.qorder
@@ -128,6 +130,7 @@
128 130
     <!--获取试卷所有主观题-->
129 131
     <resultMap id="subjectiveQuestions" type="java.util.Map">
130 132
         <result column="mptid" property="mptid" />
133
+        <result column="mptqn" property="mptqn" />
131 134
         <result column="mptname" property="mptname" />
132 135
         <result column="mptnum" property="mptnum" />
133 136
         <result column="mptorder" property="mptorder" />
@@ -143,7 +146,7 @@
143 146
         </collection>
144 147
     </resultMap>
145 148
     <select id="listSubjectiveQuestionsFj" resultMap="subjectiveQuestions">
146
-        select t.mptid,t.mptname,t.mptnum,t.mptorder,t.mptscore,
149
+        select t.mptid,t.mptqn,t.mptname,t.mptnum,t.mptorder,t.mptscore,
147 150
         q.mptqid,q.qtypeid,q.qtypename,q.ctype,q.qscore,q.qn,q.qorder
148 151
         from ms_paper_qtype_question q left join ms_paper_qtype t on t.mptid=q.mptid
149 152
         where t.mpid=#{mpid} and q.ctype in
@@ -154,7 +157,7 @@
154 157
     </select>
155 158
 
156 159
     <select id="listSubjectiveQuestionsTk" resultMap="subjectiveQuestions">
157
-        select t.mptid,t.mptname,t.mptnum,t.mptorder,t.mptscore,
160
+        select t.mptid,t.mptqn,t.mptname,t.mptnum,t.mptorder,t.mptscore,
158 161
         q.mptqid,q.qtypeid,q.qtypename,q.ctype,q.qscore,q.qn,q.qorder
159 162
         from ms_paper_qtype_question q left join ms_paper_qtype t on t.mptid=q.mptid
160 163
         where t.mpid=#{mpid} and q.ctype in

+ 14
- 0
smarking/src/main/resources/mapper/wholeparam/MsGradeparamMapper.xml Parādīt failu

@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
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.wholeparam.MspGradeparamMapper">
4
+
5
+    <!--获取学校年级下指定模块参数-->
6
+    <select id="getGradeParamByGradeAndBelong" resultType="com.xhkjedu.smarking.model.wholeparam.MspGradeparam">
7
+        select * from msp_gradeparam where schoolid = #{gp.schoolid} and gradeid=#{gp.gradeid} and gpbelong = #{gp.gpbelong}
8
+    </select>
9
+
10
+    <!--删除-->
11
+    <delete id="deleteGradeparam">
12
+        delete from msp_gradeparam where schoolid = #{gp.schoolid} and gradeid=#{gp.gradeid} and gpbelong = #{gp.gpbelong}
13
+    </delete>
14
+</mapper>

Notiek ielāde…
Atcelt
Saglabāt