wangliang пре 4 година
родитељ
комит
20f77e23eb

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamController.java

@@ -448,7 +448,7 @@ public class TEExamController {
             });
         }
         notComplete = allCount - alreadyComplete.get();
-        ExamPropCountDto examPropCountDto = new ExamPropCountDto(examId, allCount, loginCount, prepareCount.get(), examCount.get(), clientCommunicationStatusCount.get(), monitorStatusSourceCount.get(), alreadyComplete.get(), notComplete);
+        ExamPropCountDto examPropCountDto = new ExamPropCountDto(examId, allCount, loginCount, prepareCount.get(), examCount.get(), clientCommunicationStatusCount.get(), monitorStatusSourceCount.get(), alreadyComplete.get(), notComplete, roomCodeSet);
         return ResultUtil.ok(examPropCountDto);
     }
 }

+ 4 - 4
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java

@@ -75,7 +75,7 @@ public class TIeInvigilateController {
     @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListBean.class)})
     public Result list(@ApiParam(value = "考试批次id") @RequestParam Long examId,
                        @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
-                       @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
+                       @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
                        @ApiParam(value = "试题下载状态", required = false) @RequestParam(required = false) Integer paperDownload,
                        @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
                        @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
@@ -89,7 +89,7 @@ public class TIeInvigilateController {
         if (Objects.isNull(examId) || Objects.equals(examId, "")) {
             throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
         }
-        IPage<InvigilateListBean> invigilateListBeanIPage = tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+        IPage<InvigilateListBean> invigilateListBeanIPage = tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
         BasePage basePage = new BasePage(invigilateListBeanIPage.getRecords(), invigilateListBeanIPage.getCurrent(), invigilateListBeanIPage.getSize(), invigilateListBeanIPage.getTotal());
         Map map = new HashMap<>();
         map.put(SystemConstant.RECORDS, basePage);
@@ -101,7 +101,7 @@ public class TIeInvigilateController {
     @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
     public Result listVideo(@ApiParam(value = "考试批次id") @RequestParam Long examId,
                             @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
-                            @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
+                            @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
                             @ApiParam(value = "试题下载状态", required = false) @RequestParam(required = false) Integer paperDownload,
                             @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
                             @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
@@ -115,7 +115,7 @@ public class TIeInvigilateController {
         if (Objects.isNull(examId) || Objects.equals(examId, "")) {
             throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
         }
-        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
         BasePage basePage = new BasePage(invigilateListVideoBeanIPage.getRecords(), invigilateListVideoBeanIPage.getCurrent(), invigilateListVideoBeanIPage.getSize(), invigilateListVideoBeanIPage.getTotal());
         Map map = new HashMap<>();
         map.put(SystemConstant.RECORDS, basePage);

+ 4 - 3
themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java

@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Map;
+import java.util.Set;
 
 /**
  * @Description: 考试记录 Mapper 接口
@@ -46,7 +47,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodes
      * @param paperDownload
      * @param status
      * @param name
@@ -59,7 +60,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      */
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, @Param("examId") Long examId,
                                                          @Param("examActivityId") Long examActivityId,
-                                                         @Param("roomCode") String roomCode,
+                                                         @Param("roomCodes") Set roomCodes,
                                                          @Param("paperDownload") Integer paperDownload,
                                                          @Param("status") String status,
                                                          @Param("name") String name,
@@ -88,7 +89,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, @Param("examId") Long examId,
                                                                   @Param("examActivityId") Long examActivityId,
-                                                                  @Param("roomCode") String roomCode,
+                                                                  @Param("roomCodes") Set<String> roomCodes,
                                                                   @Param("paperDownload") Integer paperDownload,
                                                                   @Param("status") String status,
                                                                   @Param("name") String name,

+ 12 - 1
themis-business/src/main/java/com/qmth/themis/business/dto/ExamPropCountDto.java

@@ -1,6 +1,7 @@
 package com.qmth.themis.business.dto;
 
 import java.io.Serializable;
+import java.util.Set;
 
 /**
  * @Description: 考试属性统计
@@ -20,12 +21,13 @@ public class ExamPropCountDto implements Serializable {
     private Integer monitorStatusSourceCount;//监控设备通讯故障
     private Integer alreadyComplete;//已完成
     private Integer notComplete;//未完成
+    private Set<String> roomCodes;
 
     public ExamPropCountDto() {
 
     }
 
-    public ExamPropCountDto(Long examId, Integer allCount, Integer loginCount, Integer prepareCount, Integer examCount, Integer clientCommunicationStatusCount, Integer monitorStatusSourceCount, Integer alreadyComplete, Integer notComplete) {
+    public ExamPropCountDto(Long examId, Integer allCount, Integer loginCount, Integer prepareCount, Integer examCount, Integer clientCommunicationStatusCount, Integer monitorStatusSourceCount, Integer alreadyComplete, Integer notComplete, Set<String> roomCodes) {
         this.examId = examId;
         this.allCount = allCount;
         this.loginCount = loginCount;
@@ -35,6 +37,15 @@ public class ExamPropCountDto implements Serializable {
         this.monitorStatusSourceCount = monitorStatusSourceCount;
         this.alreadyComplete = alreadyComplete;
         this.notComplete = notComplete;
+        this.roomCodes = roomCodes;
+    }
+
+    public Set<String> getRoomCodes() {
+        return roomCodes;
+    }
+
+    public void setRoomCodes(Set<String> roomCodes) {
+        this.roomCodes = roomCodes;
     }
 
     public Long getExamId() {

+ 14 - 13
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -10,6 +10,7 @@ import com.qmth.themis.business.enums.LivenessTypeEnum;
 import com.qmth.themis.business.enums.VerifyExceptionEnum;
 
 import java.util.Map;
+import java.util.Set;
 
 /**
  * @Description: 考试记录 服务类
@@ -100,7 +101,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodes
      * @param paperDownload
      * @param status
      * @param name
@@ -113,7 +114,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      */
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, Long examId,
                                                         Long examActivityId,
-                                                        String roomCode,
+                                                        Set<String> roomCodes,
                                                         Integer paperDownload,
                                                         String status,
                                                         String name,
@@ -129,7 +130,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodes
      * @param paperDownload
      * @param status
      * @param name
@@ -141,14 +142,14 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @return
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
-                                                                       Long examActivityId,
-                                                                       String roomCode,
-                                                                       Integer paperDownload,
-                                                                       String status,
-                                                                       String name,
-                                                                       String identity,
-                                                                       Integer minWarningCount,
-                                                                       Integer maxWarningCount,
-                                                                       String clientWebsocketStatus,
-                                                                       String monitorStatusSource);
+                                                                  Long examActivityId,
+                                                                  Set<String> roomCodes,
+                                                                  Integer paperDownload,
+                                                                  String status,
+                                                                  String name,
+                                                                  String identity,
+                                                                  Integer minWarningCount,
+                                                                  Integer maxWarningCount,
+                                                                  String clientWebsocketStatus,
+                                                                  String monitorStatusSource);
 }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -414,7 +414,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodes
      * @param paperDownload
      * @param status
      * @param name
@@ -428,7 +428,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
     @Override
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, Long examId,
                                                         Long examActivityId,
-                                                        String roomCode,
+                                                        Set<String> roomCodes,
                                                         Integer paperDownload,
                                                         String status,
                                                         String name,
@@ -437,7 +437,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
                                                         Integer maxWarningCount,
                                                         String clientWebsocketStatus,
                                                         String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePageList(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+        return tOeExamRecordMapper.invigilatePageList(iPage, examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
     }
 
     /**
@@ -446,7 +446,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodes
      * @param paperDownload
      * @param status
      * @param name
@@ -458,7 +458,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @return
      */
     @Override
-    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, Set<String> roomCodes, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource) {
+        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
     }
 }

+ 4 - 3
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -105,15 +105,16 @@
         from t_oe_exam_record t
         left join t_e_exam_student s on t.exam_student_id = s.id
         <where>
+             s.room_code in
+            <foreach collection="roomCodes" item="roomCode" index="index" open="(" close=")" separator=",">
+                #{roomCode}
+            </foreach>
             <if test="examId != null and examId != ''">
                 and t.exam_id = #{examId}
             </if>
             <if test="examActivityId != null and examActivityId != ''">
                 and t.exam_activity_id = #{examActivityId}
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and t.room_code = #{param.roomCode}
-            </if>
             <if test="paperDownload != null and paperDownload != ''">
                 and t.paper_download = #{paperDownload}
             </if>