Browse Source

课堂考试按人统计

tags/正式3.2.0
雍文秀 2 years ago
parent
commit
ed4f9616bf

+ 12
- 0
sclass/src/main/java/com/xhkjedu/sclass/controller/classroom/ClassroomController.java View File

@@ -333,4 +333,16 @@ public class ClassroomController {
333 333
         List<Map> list = classroomService.listStudent(room.getClassid(), room.getLsbid());
334 334
         return new ResultVo(0, "获取班级学生列表成功", list);
335 335
     }
336
+
337
+    @PostMapping("/list_estudent")
338
+    public ResultVo listEStudent(@RequestBody TClassroomPaper paper) {
339
+        Long paperid = paper.getPaperid();
340
+        Integer page = paper.getPage();
341
+        Integer pageSize = paper.getPageSize();
342
+        N_Utils.validation(new Object[]{paperid, "考试id", 1, page, "显示页码", 1, pageSize, "显示条数", 1});
343
+        PageHelper.startPage(page, pageSize);
344
+        List<Map> list = classroomPaperService.listEStudent(paperid);
345
+        PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
346
+        return new ResultVo(0, "获取考试按人统计列表成功", pageResult);
347
+    }
336 348
 }

+ 6
- 0
sclass/src/main/java/com/xhkjedu/sclass/mapper/classroom/ClassroomPaperStudentMapper.java View File

@@ -3,6 +3,9 @@ package com.xhkjedu.sclass.mapper.classroom;
3 3
 import com.xhkjedu.sclass.base.TkMapper;
4 4
 import com.xhkjedu.sclass.model.classroom.TClassroomPaperStudent;
5 5
 
6
+import java.util.List;
7
+import java.util.Map;
8
+
6 9
 /**
7 10
  * @author ywx
8 11
  * @classname RoomPaperStudentMapper
@@ -21,4 +24,7 @@ public interface ClassroomPaperStudentMapper extends TkMapper<TClassroomPaperStu
21 24
 
22 25
     //根据考试学生id获取考试是否完成批阅
23 26
     Integer getCheckedByPsId(Integer psid);
27
+
28
+    //考试按人统计
29
+    List<Map> listEStudent(Long paperid);
24 30
 }

+ 11
- 0
sclass/src/main/java/com/xhkjedu/sclass/service/classroom/ClassroomPaperService.java View File

@@ -225,4 +225,15 @@ public class ClassroomPaperService {
225 225
     public void updateScantronUseranswer(Integer pssid, String useranswer) {
226 226
         classroomPaperStudentScantronMapper.updateScantronUseranswer(pssid, useranswer);
227 227
     }
228
+
229
+    /**
230
+     * 考试按人统计
231
+     * @Param [paperid]
232
+     * @Author ywx
233
+     * @Date 2022/3/11 16:48
234
+     * @return java.util.List<java.util.Map>
235
+     **/
236
+    public List<Map> listEStudent(Long paperid) {
237
+        return classroomPaperStudentMapper.listEStudent(paperid);
238
+    }
228 239
 }

+ 7
- 0
sclass/src/main/resources/mapper/classroom/ClassroomPaperStudentMapper.xml View File

@@ -24,4 +24,11 @@
24 24
         left join t_classroom_paper p on ps.paperid=p.paperid
25 25
         where ps.psid=#{psid}
26 26
     </select>
27
+    <!--考试按人统计-->
28
+    <select id="listEStudent" resultType="java.util.Map">
29
+        select u.username,ps.stuscore,ps.costtime,ps.stoptime
30
+        from t_classroom_paper_student ps left join t_user u on ps.studentid=u.userid
31
+        where ps.paperid=#{paperid}
32
+        order by ps.stuscore desc
33
+    </select>
27 34
 </mapper>

Loading…
Cancel
Save