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

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

35
     <!-- 获取分页资源(android) -->
35
     <!-- 获取分页资源(android) -->
36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
37
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath
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
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
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
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
40
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
43
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
41
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
44
          limit #{read.page},#{read.pageSize}
42
          limit #{read.page},#{read.pageSize}
99
     <!--电子书列表-->
97
     <!--电子书列表-->
100
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
98
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
101
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath,readcomm
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
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
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
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
102
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
107
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
103
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
108
     </select>
104
     </select>

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

333
         List<Map> list = classroomService.listStudent(room.getClassid(), room.getLsbid());
333
         List<Map> list = classroomService.listStudent(room.getClassid(), room.getLsbid());
334
         return new ResultVo(0, "获取班级学生列表成功", list);
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
 import com.xhkjedu.sclass.base.TkMapper;
3
 import com.xhkjedu.sclass.base.TkMapper;
4
 import com.xhkjedu.sclass.model.classroom.TClassroomPaperStudent;
4
 import com.xhkjedu.sclass.model.classroom.TClassroomPaperStudent;
5
 
5
 
6
+import java.util.List;
7
+import java.util.Map;
8
+
6
 /**
9
 /**
7
  * @author ywx
10
  * @author ywx
8
  * @classname RoomPaperStudentMapper
11
  * @classname RoomPaperStudentMapper
21
 
24
 
22
     //根据考试学生id获取考试是否完成批阅
25
     //根据考试学生id获取考试是否完成批阅
23
     Integer getCheckedByPsId(Integer psid);
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
     public void updateScantronUseranswer(Integer pssid, String useranswer) {
225
     public void updateScantronUseranswer(Integer pssid, String useranswer) {
226
         classroomPaperStudentScantronMapper.updateScantronUseranswer(pssid, useranswer);
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
         left join t_classroom_paper p on ps.paperid=p.paperid
24
         left join t_classroom_paper p on ps.paperid=p.paperid
25
         where ps.psid=#{psid}
25
         where ps.psid=#{psid}
26
     </select>
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
 </mapper>
34
 </mapper>

Loading…
Cancel
Save