Sfoglia il codice sorgente

作业统计--按人详情(附件、题库、靶向)

tags/正式3.9.0
雍文秀 1 anno fa
parent
commit
85bd929192

+ 15
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperAnalyzeController.java Vedi File

@@ -139,6 +139,21 @@ public class PaperAnalyzeController {
139 139
         return new ResultVo(0,"获取答题卡作业统计--按人详情成功",paper);
140 140
     }
141 141
 
142
+    /**
143
+     * @Description 作业统计--按人详情
144
+     * @Param [student]
145
+     * @Author ywx
146
+     * @Date 2023/5/6 10:14
147
+     * @return com.xhkjedu.vo.ResultVo
148
+     **/
149
+    @PostMapping("/stu_detail")
150
+    public ResultVo StuDetailAnalyze(@RequestBody TPaperStudent student) {
151
+        Integer psid = student.getPsid();
152
+        N_Utils.validation(new Object[]{psid, "作业学生id", 1});
153
+        StudentPaperVo paper = paperAnalyzeService.getStuDetailAnalyze(psid);
154
+        return new ResultVo(0, "获取作业统计--按人详情成功", paper);
155
+    }
156
+
142 157
     @PostMapping("/paper_class")
143 158
     public ResultVo paperClass(@RequestBody TPaper paper){
144 159
         Integer paperid = paper.getPaperid();

+ 9
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperAnalyzeMapper.java Vedi File

@@ -148,6 +148,15 @@ public interface PaperAnalyzeMapper extends TkMapper<TPaperAnalyze> {
148 148
      **/
149 149
     List<StudentPaperTypeVo> listPeopleSDetailAnalyze(Integer psid);
150 150
 
151
+    /**
152
+     * @Description 答题卡作业统计 按人详情 题型列表
153
+     * @Param [psid]
154
+     * @Author ywx
155
+     * @Date 2023/5/6 10:30
156
+     * @return java.util.List<com.xhkjedu.sstudy.vo.paperstudent.StudentPaperTypeVo>
157
+     **/
158
+    List<StudentPaperTypeVo> listStuDetailAnalyze(Integer psid);
159
+
151 160
     /**
152 161
      * 获取作业提交情况
153 162
      * @Param [papernum, createid]

+ 23
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperAnalyzeService.java Vedi File

@@ -192,6 +192,29 @@ public class PaperAnalyzeService {
192 192
         return paper;
193 193
     }
194 194
 
195
+    /**
196
+     * @Description 作业统计--按人详情
197
+     * @Param [psid]
198
+     * @Author ywx
199
+     * @Date 2023/5/6 10:14
200
+     * @return com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo
201
+     **/
202
+    public StudentPaperVo getStuDetailAnalyze(Integer psid) {
203
+        StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
204
+        Integer papertype = paper.getPapertype();
205
+        List<StudentPaperTypeVo> types;
206
+        if (papertype == 2) {//附件作业
207
+            types = paperAnalyzeMapper.listStuDetailAnalyze(psid);
208
+            List<TPaperFile> files = paperMapper.listPaperFile(paper.getPaperid(), 0);
209
+            paper.setFiles(files);
210
+        } else {
211
+            types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
212
+            StudyUtil.setPaperQuestion(types, paperAnalyzeMapper);//处理母子题
213
+        }
214
+        paper.setTypes(types);
215
+        return paper;
216
+    }
217
+
195 218
     /**
196 219
      * 获取作业提交情况
197 220
      * @Param [papernum, createid]

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperGroupService.java Vedi File

@@ -438,7 +438,7 @@ public class PaperGroupService {
438 438
                     //获取学生的试卷分值信息
439 439
                     List<TPaperQtypeQuestion> stuques = pquestions.stream().filter(
440 440
                             (pq) -> s.getQuestions().stream().collect(Collectors.toList()).contains(pq.getQuestionpid())).collect(Collectors.toList());
441
-                    if(N_Utils.isListNotEmpty(stuques)) continue;//学生收到的试题为空不保存
441
+                    if(N_Utils.isListEmpty(stuques)) continue;//学生收到的试题为空不保存
442 442
                     //计算学生试卷中试题总分值
443 443
                     double pscore = stuques.stream().collect(Collectors.summingDouble(TPaperQtypeQuestion::getPtqscore));
444 444
                     ps.setPaperscore(pscore);

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperStudentQuestionVo.java Vedi File

@@ -91,6 +91,9 @@ public class PaperStudentQuestionVo {
91 91
     //批语
92 92
     private String checkcomm;
93 93
 
94
+    //选项数量
95
+    private Integer optionnum;
96
+
94 97
     private String mqstem;//母题题干
95 98
     private String mqoption;//母题选项
96 99
     private String mqanswer;//母题答案

+ 11
- 0
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml Vedi File

@@ -205,6 +205,7 @@
205 205
             <result property="sorder" column="sorder"></result>
206 206
             <result property="questionpid" column="questionpid"></result>
207 207
             <result property="qn" column="qn"></result>
208
+            <result property="optionnum" column="optionnum"></result>
208 209
         </collection>
209 210
     </resultMap>
210 211
     <!--作业统计 按人详情 题型列表-->
@@ -265,6 +266,16 @@
265 266
         LEFT JOIN t_paper_scantron_qtype psq ON psc.paperid = psq.paperid AND psc.psqtypeid=psq.psqtypeid
266 267
         WHERE pss.psid=#{psid} ORDER BY psq.pstorder,pss.qorder
267 268
     </select>
269
+    <!--答题卡作业统计 按人详情 题型列表-->
270
+    <select id="listStuDetailAnalyze" resultMap="typeQuestion">
271
+        SELECT psq.qtypename,psq.pstorder ptorder,psq.pstscore ptscore,psq.pstnum ptnum,
272
+        pss.pssid,pss.paperid,pss.studentid,pss.psid,pss.qn,pss.qorder,pss.answered,pss.answertype,pss.useranswer,pss.converted,pss.useranswertext,pss.useranswertxt,
273
+        pss.answertime,pss.costtime,pss.checked,pss.stuscore,pss.qscore,pss.pscaid questionid,pss.checkcomm,
274
+        psc.qtypeid,psc.ctype,psc.psanswer qanswer,psc.optionnum
275
+        FROM t_paper_student_scantron pss LEFT JOIN t_paper_scantron psc ON pss.pscaid = psc.pscaid
276
+        LEFT JOIN t_paper_scantron_qtype psq ON psc.paperid = psq.paperid AND psc.psqtypeid=psq.psqtypeid
277
+        WHERE pss.psid=#{psid} ORDER BY psq.pstorder,pss.qorder
278
+    </select>
268 279
     <resultMap id="commitAnalyze" type="com.xhkjedu.sstudy.vo.paper.PaperCAnalyzeVo">
269 280
         <result property="paperid" column="paperid"></result>
270 281
         <result property="papername" column="papername"></result>

Loading…
Annulla
Salva