Browse Source

班级报告列表

tags/正式版本
王宁 2 years ago
parent
commit
12cd41e1aa

+ 20
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/report/EReportClassController.java View File

@@ -6,6 +6,7 @@ import com.xhkjedu.sexam.model.reportstu.ERstudent;
6 6
 import com.xhkjedu.sexam.model.reportstu.ERstudentAction;
7 7
 import com.xhkjedu.sexam.service.report.EReportClassService;
8 8
 import com.xhkjedu.sexam.vo.report.ERankParamVo;
9
+import com.xhkjedu.sexam.vo.report.ReportParamsVo;
9 10
 import com.xhkjedu.utils.N_Utils;
10 11
 import com.xhkjedu.utils.PageUtil;
11 12
 import com.xhkjedu.vo.PageResult;
@@ -277,4 +278,23 @@ public class EReportClassController {
277 278
         List<Map> list = eReportClassService.listSjGkYxj(rank);
278 279
         return new ResultVo(0, "获取成功", list);
279 280
     }
281
+
282
+    /**
283
+     * @Description 教师权限班级已结束考试列表
284
+     * @Param [paramsVo]
285
+     * @Return com.xhkjedu.vo.ResultVo
286
+     * @Author wn
287
+     * @Date 2022/9/21 9:47
288
+     **/
289
+    @PostMapping("/ends")
290
+    public ResultVo listEndExamsForClass(@RequestBody ReportParamsVo paramsVo) {
291
+        Integer page = paramsVo.getPage();
292
+        Integer pageSize = paramsVo.getPageSize();
293
+        N_Utils.validation(new Object[]{paramsVo.getUserid(), "用户id", 1
294
+                , page, "显示页码", 1, pageSize, "显示条数", 1});
295
+        PageHelper.startPage(page, pageSize);
296
+        List<Map> list = eReportClassService.listEndExamsForClass(paramsVo.getUserid());
297
+        PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
298
+        return new ResultVo(0, "获取成功", pageResult);
299
+    }
280 300
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/reportclass/EReportClassMapper.java View File

@@ -40,4 +40,7 @@ public interface EReportClassMapper {
40 40
 
41 41
     //试卷概况-优秀卷
42 42
     List<Map> listSjGkYxj(@Param("rank") ERankParamVo rank);
43
+
44
+    //班级报告列表
45
+    List<Map> listEndExamsForClass(@Param("teacherid") Integer teacherid);
43 46
 }

+ 5
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java View File

@@ -310,4 +310,9 @@ public class EReportClassService {
310 310
     public List<Map> listSjGkYxj(ERankParamVo rank) {
311 311
         return eReportClassMapper.listSjGkYxj(rank);
312 312
     }
313
+
314
+    //教师权限班级考试列表
315
+    public List<Map> listEndExamsForClass(Integer teacherid){
316
+        return eReportClassMapper.listEndExamsForClass(teacherid);
317
+    }
313 318
 }

+ 24
- 0
sexam/src/main/resources/mapper/report/EReportClassMapper.xml View File

@@ -93,4 +93,28 @@
93 93
         FROM e_paper_student_question psq LEFT JOIN t_user u ON psq.studentid=u.userid
94 94
         WHERE epid=#{rank.epid} AND classid=#{rank.classid} AND good=1 and psq.qorder=#{rank.qorder}
95 95
     </select>
96
+
97
+    <!--班级报告列表-->
98
+    <resultMap id="listExamEndResult" type="java.util.Map">
99
+        <result property="examid" column="examid"></result>
100
+        <result property="examname" column="examname"></result>
101
+        <result property="examdate" column="examdate"></result>
102
+        <result property="gradeid" column="gradeid"></result>
103
+        <result property="examtype" column="examtype"></result>
104
+        <result property="exammode" column="exammode"></result>
105
+        <result property="examcomm" column="examcomm"></result>
106
+        <collection property="subjects" ofType="java.util.Map" javaType="java.util.List">
107
+            <result property="esid" column="esid"></result>
108
+            <result property="subjectid" column="subjectid"></result>
109
+            <result property="subjectname" column="subjectname"></result>
110
+        </collection>
111
+    </resultMap>
112
+    <select id="listEndExamsForClass" resultMap="listExamEndResult">
113
+        select e.examid,e.examname,e.examdate,e.gradeid,e.examtype,e.exammode,e.monitored,e.examcomm
114
+             ,s.esid,s.subjectid,s.subjectname
115
+        from e_base e left join e_subject s on e.examid=s.examid left join e_class c on e.examid=c.examid
116
+        left join t_class_teacher ct on c.classid=ct.classid
117
+        where e.examstate=2 and e.deleted=1 and s.pstate=2
118
+          and ct.teacherid=#{teacherid} group by s.esid order by e.examdate desc, s.esid asc
119
+    </select>
96 120
 </mapper>

Loading…
Cancel
Save