Переглянути джерело

设置考试学生报告排名显示

学生待考列表生成报告后显示未结束的考试
tags/正式版本
雍文秀 2 роки тому
джерело
коміт
242526558e

+ 14
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/EBaseController.java Переглянути файл

@@ -564,4 +564,18 @@ public class EBaseController {
564 564
         return new ResultVo(0, "获取缺考详情成功", list);
565 565
     }
566 566
 
567
+    /*
568
+     * 设置学生报告排名显示
569
+     * @Param [eBase]
570
+     * @Author ywx
571
+     * @Date 2022/11/14 15:19
572
+     * @return com.xhkjedu.vo.ResultVo
573
+     **/
574
+    @PostMapping("/set_show")
575
+    public ResultVo setShowRank(@RequestBody EBase eBase) {
576
+        N_Utils.validation(new Object[]{eBase.getExamid(), "考试id", 1});
577
+        eBaseService.setShowRank(eBase);
578
+        return new ResultVo(0, "设置成功");
579
+    }
580
+
567 581
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/exam/EBase.java Переглянути файл

@@ -36,6 +36,9 @@ public class EBase extends BaseBean {
36 36
     //考试状态0未开始1已开始2已结束3已生成报告
37 37
     private Integer examstate;
38 38
 
39
+    //显示排名0不显示1显示
40
+    private Integer showrank;
41
+
39 42
     //考试公告
40 43
     private String examcomm;
41 44
 

+ 7
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java Переглянути файл

@@ -66,6 +66,7 @@ public class EBaseService {
66 66
         try {
67 67
             //考试
68 68
             model.setExamstate(0);
69
+            model.setShowrank(0);
69 70
             model.setDeleted(1);
70 71
             model.setReportstate(0);
71 72
             model.setCreatetime(N_Utils.getSecondTimestamp());
@@ -450,4 +451,10 @@ public class EBaseService {
450 451
         }
451 452
         return list;
452 453
     }
454
+
455
+    //设置学生报告排名显示
456
+    public void setShowRank(EBase eBase) {
457
+        if (eBase.getShowrank() == null) eBase.setShowrank(0);
458
+        eBaseMapper.updateByPrimaryKeySelective(eBase);
459
+    }
453 460
 }

+ 1
- 1
sexam/src/main/resources/mapper/exam/EBaseMapper.xml Переглянути файл

@@ -16,7 +16,7 @@
16 16
     </delete>
17 17
     <!--考试列表-->
18 18
     <select id="listAll" resultType="java.util.Map">
19
-        select b.examid,b.examname,b.examdate,b.gradeid,b.examtype,b.exammode,b.monitored
19
+        select b.examid,b.examname,b.examdate,b.gradeid,b.examtype,b.exammode,b.monitored,b.showrank
20 20
         ,b.examstate,u.username createname,group_concat(distinct es.subjectname order by es.esid separator '|')subjectname
21 21
         ,count(distinct case when es.begintime is null or es.begintime='' then es.esid else null end)esnum
22 22
         ,min(es.esstate)esstate,min(ifnull(ep.correcttype,0))correcttype

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml Переглянути файл

@@ -8,7 +8,7 @@
8 8
         e.examname,e.gradeid,e.examtype,ep.epid,ep.ptype,eps.sstate
9 9
         from e_paper_student eps left join e_subject es on eps.esid=es.esid
10 10
          left join e_paper ep on eps.epid=ep.epid left join e_base e on eps.examid=e.examid
11
-        where e.deleted=1 and e.exammode=1 and eps.studentid=#{studentid} and e.examstate=1
11
+        where e.deleted=1 and e.exammode=1 and eps.studentid=#{studentid} and e.examstate>=1 and es.pstate!=2
12 12
          GROUP BY eps.epsid
13 13
         order by UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime)) desc,es.esid desc
14 14
     </select>

Завантаження…
Відмінити
Зберегти