Kaynağa Gözat

获取待阅卷/监考数量

tags/正式3.14.1
雍文秀 4 ay önce
ebeveyn
işleme
876c46380c

+ 14
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/ESubjectInvigilateController.java Dosyayı Görüntüle

@@ -195,6 +195,20 @@ public class ESubjectInvigilateController {
195 195
         return new ResultVo(0, "获取成功", pageResult);
196 196
     }
197 197
 
198
+    /**
199
+     * @Description 获取待监考数量
200
+     * @Date 2024/9/18 11:07
201
+     * @Author YWX
202
+     * @Param [subject]
203
+     * @Return com.xhkjedu.vo.ResultVo
204
+     **/
205
+    @PostMapping("/get_jk_num")
206
+    public ResultVo getJtJkSubjectNum(@RequestBody ESubject subject) {
207
+        Integer teacherid = subject.getTeacherid();
208
+        N_Utils.validation(new Object[]{teacherid, "教师id", 1});
209
+        return new ResultVo(0, "获取成功", eSubjectInvigilateService.getJtJkSubjectNum(teacherid));
210
+    }
211
+
198 212
     /*
199 213
      * 管理员监考-监控列表
200 214
      * @Param [subject]

+ 14
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/paper/EPaperCorrectTeacherController.java Dosyayı Görüntüle

@@ -50,6 +50,20 @@ public class EPaperCorrectTeacherController {
50 50
         return new ResultVo(0, "获取成功", list);
51 51
     }
52 52
 
53
+    /**
54
+     * @Description 获取待阅卷数量
55
+     * @Date 2024/9/18 10:35
56
+     * @Author YWX
57
+     * @Param [vo]
58
+     * @Return com.xhkjedu.vo.ResultVo
59
+     **/
60
+    @PostMapping("/get_pending_num")
61
+    public ResultVo getPendingNum(@RequestBody ESubject vo) {
62
+        Integer teacherid = vo.getTeacherid();
63
+        N_Utils.validation(new Object[]{teacherid, "教师id", 1});
64
+        return new ResultVo(0, "获取成功", correctTeacherService.getPendingNum(teacherid));
65
+    }
66
+
53 67
     /**
54 68
      * 已阅卷列表
55 69
      *

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/ESubjectInvigilateMapper.java Dosyayı Görüntüle

@@ -28,4 +28,7 @@ public interface ESubjectInvigilateMapper extends TkMapper<ESubjectInvigilate> {
28 28
 
29 29
     //监考教师
30 30
     List<EITeacherVo> listUserByEsIds(@Param("esids") String esids);
31
+
32
+    //获取待监考数量
33
+    Integer getJtJkSubjectNum(@Param("teacherid") Integer teacherid);
31 34
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperCorrectTeacherMapper.java Dosyayı Görüntüle

@@ -78,4 +78,7 @@ public interface EPaperCorrectTeacherMapper {
78 78
     EPaperSQuestionVo getPaperCheck(@Param("psq") EPaperStudentQuestion psq);
79 79
 
80 80
     EPaperSQuestionVo getCorrectQuestion3(Integer teacherid, Integer eptqid, String classids, Integer epsqid);
81
+
82
+    //获取待阅卷数量
83
+    Integer getPendingNum(@Param("teacherid") Integer teacherid);
81 84
 }

+ 11
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectInvigilateService.java Dosyayı Görüntüle

@@ -220,4 +220,15 @@ public class ESubjectInvigilateService {
220 220
     public List<Map> listMissStu(EPTeacherVo vo) {
221 221
         return eSubjectInvigilateMapper.listMissStu(vo);
222 222
     }
223
+
224
+    /**
225
+     * @Description 获取待监考数量
226
+     * @Date 2024/9/18 11:07
227
+     * @Author YWX
228
+     * @Param [teacherid]
229
+     * @Return java.lang.Integer
230
+     **/
231
+    public Integer getJtJkSubjectNum(Integer teacherid) {
232
+        return eSubjectInvigilateMapper.getJtJkSubjectNum(teacherid);
233
+    }
223 234
 }

+ 11
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperCorrectTeacherService.java Dosyayı Görüntüle

@@ -353,4 +353,15 @@ public class EPaperCorrectTeacherService {
353 353
         // 关闭线程池
354 354
         exec.shutdown();
355 355
     }
356
+
357
+    /**
358
+     * @Description 获取待阅卷数量
359
+     * @Date 2024/9/18 10:35
360
+     * @Author YWX
361
+     * @Param [teacherid]
362
+     * @Return java.lang.Integer
363
+     **/
364
+    public Integer getPendingNum(Integer teacherid) {
365
+        return correctTeacherMapper.getPendingNum(teacherid);
366
+    }
356 367
 }

+ 8
- 0
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml Dosyayı Görüntüle

@@ -71,4 +71,12 @@
71 71
         from e_subject_invigilate ei left join t_user u on ei.teacherid = u.userid
72 72
         where ei.esid in(${esids}) order by convert(u.username using gbk),u.userid
73 73
     </select>
74
+    <!--获取待监考数量-->
75
+    <select id="getJtJkSubjectNum" resultType="java.lang.Integer">
76
+        select count(distinct es.esid) as num
77
+        from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
78
+        left join e_base eb on eb.examid = es.examid
79
+        where eb.deleted=1 and eb.examstate!=0 and eb.exammode=1 and eb.monitored=1
80
+        and es.pstate!=2 and ei.teacherid=#{teacherid}
81
+    </select>
74 82
 </mapper>

+ 19
- 0
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml Dosyayı Görüntüle

@@ -213,4 +213,23 @@
213 213
             and psq.classid in(${psq.classids})
214 214
         </if>
215 215
     </select>
216
+    <!--获取待阅卷数量-->
217
+    <select id="getPendingNum" resultType="java.lang.Integer">
218
+        select count(distinct a.epid) as num
219
+        from (select p.epid,p.examid
220
+                   ,count(if(psq.answered = 1, psq.epsqid, null))                     tjnum
221
+                   ,count(if(psq.answered = 1 and psq.checked = 2, psq.epsqid, null)) pynum
222
+              from e_paper p left join e_paper_correctclass pc on p.epid = pc.epid
223
+              left join e_paper_student_question psq on psq.classid = pc.classid and psq.epid = p.epid
224
+              where pc.teacherid = #{teacherid} and psq.ctype in (3, 13, 14, 15) group by p.epid
225
+              union
226
+              select p.epid,p.examid
227
+                   ,count(if(psq.answered = 1, psq.epsqid, null))                     tjnum
228
+                   ,count(if(psq.answered = 1 and psq.checked = 2, psq.epsqid, null)) pynum
229
+              from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
230
+              left join e_paper_student_question psq on psq.eptqid = pq.eptqid
231
+              where pq.teacherid = #{teacherid}
232
+              group by p.epid) a left join e_base eb on a.examid = eb.examid
233
+        where a.tjnum != a.pynum and eb.deleted = 1
234
+    </select>
216 235
 </mapper>

Loading…
İptal
Kaydet