Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式3.2.0
王宁 2 years ago
parent
commit
e8e7915ed8

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/service/itemtool/ReadService.java View File

@@ -143,7 +143,7 @@ public class ReadService {
143 143
      */
144 144
     public List<TRead> listReadsForAndr(TRead read) {
145 145
         List<TRead> reads = readMapper.listReadsForAndr(read);
146
-        //readDateService.setReads(reads);//关联阅读开放时间
146
+        readDateService.setReads(reads);//关联阅读开放时间
147 147
         return reads;
148 148
     }
149 149
 

+ 2
- 6
sapi/src/main/resources/mapper/itemtool/ReadMapper.xml View File

@@ -35,10 +35,8 @@
35 35
     <!-- 获取分页资源(android) -->
36 36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
37 37
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath
38
-        FROM t_read r left join t_read_date rd on r.readid=rd.readid
38
+        FROM t_read r
39 39
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
40
-        and rd.weeknum=DATE_FORMAT(CURDATE(),'%w') and CURRENT_TIME() between rd.begintime and concat(rd.endtime,':59')
41
-        group by r.readid
42 40
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
43 41
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
44 42
          limit #{read.page},#{read.pageSize}
@@ -99,10 +97,8 @@
99 97
     <!--电子书列表-->
100 98
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
101 99
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath,readcomm
102
-        FROM t_read r left join t_read_date rd on r.readid=rd.readid
100
+        FROM t_read r
103 101
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
104
-        and rd.weeknum=DATE_FORMAT(CURDATE(),'%w') and CURRENT_TIME() between rd.begintime and concat(rd.endtime,':59')
105
-        group by r.readid
106 102
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
107 103
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
108 104
     </select>

+ 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