Преглед на файлове

监控列表

tags/正式版本
雍文秀 преди 2 години
родител
ревизия
5999064273

+ 3
- 4
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/ESubjectBadstudentController.java Целия файл

@@ -57,7 +57,7 @@ public class ESubjectBadstudentController {
57 57
         Integer classid = invigilate.getClassid();
58 58
         Integer page = invigilate.getPage();
59 59
         Integer pageSize = invigilate.getPageSize();
60
-        N_Utils.validation(new Object[]{teacherid, "教师id", 1, esid, "考试科目id", page, "页码", 1, pageSize, "显示条数", 1});
60
+        N_Utils.validation(new Object[]{teacherid, "教师id", 1, esid, "考试科目id", 1, page, "页码", 1, pageSize, "显示条数", 1});
61 61
         Map map = eSubjectBadstudentService.getJkDetail(esid, teacherid);
62 62
         String classids = map.get("classids").toString();
63 63
         PageHelper.startPage(page, pageSize);
@@ -81,11 +81,10 @@ public class ESubjectBadstudentController {
81 81
         Integer classid = invigilate.getClassid();
82 82
         Integer page = invigilate.getPage();
83 83
         Integer pageSize = invigilate.getPageSize();
84
-        N_Utils.validation(new Object[]{esid, "考试科目id", page, "页码", 1, pageSize, "显示条数", 1});
84
+        N_Utils.validation(new Object[]{esid, "考试科目id", 1, page, "页码", 1, pageSize, "显示条数", 1});
85 85
         Map map = eSubjectBadstudentService.getJkDetail(esid, 0);
86
-        String classids = map.get("classids").toString();
87 86
         PageHelper.startPage(page, pageSize);
88
-        List<Map> list = eSubjectBadstudentService.listStu(esid, classids, classid, invigilate.getCreatename());
87
+        List<Map> list = eSubjectBadstudentService.listStu(esid, null, classid, invigilate.getCreatename());
89 88
         PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
90 89
         map.put("pageResult", pageResult);
91 90
         return new ResultVo(0, "获取成功", map);

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectBadstudentService.java Целия файл

@@ -37,7 +37,7 @@ public class ESubjectBadstudentService {
37 37
     public Map getJkDetail(Integer esid, Integer teacherid) {
38 38
         Map map = eSubjectMapper.getESubjectByEsId(esid);//考试科目基本信息
39 39
         List<Map> classes = eClassMapper.listByExamId((Integer) map.get("examid"));//考试班级
40
-        String classids = null;
40
+        String classids = "";
41 41
         if (teacherid != 0) {
42 42
             Map claMap = eSubjectBadstudentMapper.getClass(esid, teacherid);//教师监考班级
43 43
             if (claMap.get("majored").equals(0)) {//教师不是主监考
@@ -65,7 +65,7 @@ public class ESubjectBadstudentService {
65 65
 
66 66
     //教师监考班级ids
67 67
     public String getClassIds(Integer esid, Integer teacherid) {
68
-        String classids = null;
68
+        String classids = "";
69 69
         if (teacherid != 0) {
70 70
             Map claMap = eSubjectBadstudentMapper.getClass(esid, teacherid);//教师监考班级
71 71
             if (claMap.get("majored").equals(0)) {//教师不是主监考

+ 14
- 14
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml Целия файл

@@ -35,20 +35,19 @@
35 35
         from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
36 36
         left join e_base eb on eb.examid = es.examid
37 37
         left join e_class ec on eb.examid = ec.examid
38
-        <where>
39
-            <if test="teacherid!=null and teacherid!=0">
40
-                and ei.teacherid=#{teacherid}
41
-            </if>
42
-            <if test="examid!=null and examid!=0">
43
-                and es.examid=#{examid}
44
-            </if>
45
-            <if test="esstate==1">
46
-                and concat(es.sdate,' ',es.endtime)>now()
47
-            </if>
48
-            <if test="esstate==2">
49
-                and concat(es.sdate,' ',es.endtime)&lt;=now()
50
-            </if>
51
-        </where>
38
+        where eb.deleted=1 and eb.examstate!=0
39
+        <if test="teacherid!=null and teacherid!=0">
40
+            and ei.teacherid=#{teacherid}
41
+        </if>
42
+        <if test="examid!=null and examid!=0">
43
+            and es.examid=#{examid}
44
+        </if>
45
+        <if test="esstate==1">
46
+            and concat(es.sdate,' ',es.endtime)>now()
47
+        </if>
48
+        <if test="esstate==2">
49
+            and concat(es.sdate,' ',es.endtime)&lt;=now()
50
+        </if>
52 51
         group by es.esid
53 52
         <if test="esstate==1">
54 53
             order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
@@ -56,6 +55,7 @@
56 55
         <if test="esstate==2">
57 56
             order by es.sdate desc,es.endtime desc
58 57
         </if>)es left join e_paper_student eps on es.esid = eps.esid and eps.classid in(es.classids)
58
+        group by es.esid
59 59
     </select>
60 60
 
61 61
 </mapper>

Loading…
Отказ
Запис