Forráskód Böngészése

Merge branch 'dev'
1

wangliang 4 éve
szülő
commit
b0777dee8d

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

@@ -94,31 +94,31 @@ public class TIeInvigilateController {
     @Resource
     SystemConfig systemConfig;
 
-    @ApiOperation(value = "实时监控台列表接口")
-    @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListBean.class)})
-    public Result list(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
-                       @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
-                       @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
-                       @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,
-                       @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
-                       @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
-                       @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
-                       @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
-                       @ApiParam(value = "监控设备通信状态", required = false) @RequestParam(required = false) String monitorStatusSource,
-                       @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
-                       @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
-        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
-        //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
-        if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
-        }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId));
-    }
+//    @ApiOperation(value = "实时监控台列表接口")
+//    @RequestMapping(value = "/list", method = RequestMethod.POST)
+//    @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListBean.class)})
+//    public Result list(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
+//                       @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
+//                       @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
+//                       @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,
+//                       @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
+//                       @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
+//                       @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
+//                       @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
+//                       @ApiParam(value = "监控设备通信状态", required = false) @RequestParam(required = false) String monitorStatusSource,
+//                       @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
+//                       @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+//        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+//        AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
+//        //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
+//        Long userId = null;
+//        if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
+//            userId = tbUser.getId();
+//        }
+//        return ResultUtil.ok(tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId));
+//    }
 
     @ApiOperation(value = "实时监控台视频列表接口")
     @RequestMapping(value = "/list/video", method = RequestMethod.POST)

+ 70 - 5
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java

@@ -3,13 +3,12 @@ package com.qmth.themis.business.bean.backend;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.themis.business.enums.ExamRecordStatusEnum;
-import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
+import com.qmth.themis.business.enums.MonitorStatusSourceEnum;
 import com.qmth.themis.business.enums.WebsocketStatusEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * @Description: 实时监控台视频返回对象
@@ -58,15 +57,36 @@ public class InvigilateListVideoBean implements Serializable {
     @ApiModelProperty(name = "姓名")
     private String name;
 
+    @ApiModelProperty(name = "科目名称")
+    private String courseName;
+
+    @ApiModelProperty(name = "科目编码")
+    private String courseCode;
+
+    @ApiModelProperty(name = "试题下载状态")
+    private Integer paperDownload;
+
     @ApiModelProperty(name = "考生状态")
     private String status;
 
     @ApiModelProperty(name = "考生状态值")
     private ExamRecordStatusEnum statusCode;
 
+    @ApiModelProperty(name = "答题进度")
+    private Double progress;
+
     @ApiModelProperty(name = "预警量")
     private Integer warningCount;
 
+    @ApiModelProperty(name = "客户端网络通信状态")
+    private WebsocketStatusEnum clientWebsocketStatus;
+
+    @ApiModelProperty(name = "监控通信状态")
+    private MonitorStatusSourceEnum monitorStatusSource;
+
+    @ApiModelProperty(name = "ip地址")
+    private String clientCurrentIp;
+
     @ApiModelProperty(name = "是否违纪")
     private Integer breachStatus;
 
@@ -76,15 +96,60 @@ public class InvigilateListVideoBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Long updateTime;
 
-    @ApiModelProperty(name = "答题进度")
-    private Double progress;
-
     @ApiModelProperty(name = "剩余时间")
     private String remainTime;
 
     @ApiModelProperty(name = "新增预警")
     private Integer warningNew;
 
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public Integer getPaperDownload() {
+        return paperDownload;
+    }
+
+    public void setPaperDownload(Integer paperDownload) {
+        this.paperDownload = paperDownload;
+    }
+
+    public WebsocketStatusEnum getClientWebsocketStatus() {
+        return clientWebsocketStatus;
+    }
+
+    public void setClientWebsocketStatus(WebsocketStatusEnum clientWebsocketStatus) {
+        this.clientWebsocketStatus = clientWebsocketStatus;
+    }
+
+    public MonitorStatusSourceEnum getMonitorStatusSource() {
+        return monitorStatusSource;
+    }
+
+    public void setMonitorStatusSource(MonitorStatusSourceEnum monitorStatusSource) {
+        this.monitorStatusSource = monitorStatusSource;
+    }
+
+    public String getClientCurrentIp() {
+        return clientCurrentIp;
+    }
+
+    public void setClientCurrentIp(String clientCurrentIp) {
+        this.clientCurrentIp = clientCurrentIp;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
     public Integer getSeq() {
         return seq;
     }

+ 13 - 18
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -154,12 +154,10 @@
 			<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
 				and t.warning_count &gt;= #{minWarningCount}
 			</if>
-			<if
-				test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
+			<if test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
 				and t.client_websocket_status = #{clientWebsocketStatus}
 			</if>
-			<if
-				test="monitorStatusSource != null and monitorStatusSource != ''">
+			<if test="monitorStatusSource != null and monitorStatusSource != ''">
 				and t.monitor_status_source = #{monitorStatusSource}
 			</if>
 			and s.enable = 1
@@ -244,16 +242,16 @@
 		) t
 		<where>
 			<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
-				and t.multipleFaceCount &lt;= #{minMultipleFaceCount}
+				and t.multipleFaceCount &gt;= #{minMultipleFaceCount}
 			</if>
 			<if test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
-				and t.multipleFaceCount &gt;= #{maxMultipleFaceCount}
+				and t.multipleFaceCount &lt;= #{maxMultipleFaceCount}
 			</if>
 			<if test="minExceptionCount != null and minExceptionCount != '' or minExceptionCount == 0">
-				and t.exceptionCount &lt;= #{minExceptionCount}
+				and t.exceptionCount &gt;= #{minExceptionCount}
 			</if>
 			<if test="maxExceptionCount != null and maxExceptionCount != '' or maxExceptionCount == 0">
-				and t.exceptionCount &gt;= #{maxExceptionCount}
+				and t.exceptionCount &lt;= #{maxExceptionCount}
 			</if>
 		</where>
 		,(SELECT @i := 0) as i
@@ -336,24 +334,21 @@
 			and teea.enable = 1
 			and tees.enable = 1
 		</where>
-		) t
+		) t,(SELECT @i := 0) as i
 		<where>
-			<if
-				test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
-				and t.multipleFaceCount &lt;= #{minMultipleFaceCount}
+			<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
+				and t.multipleFaceCount &gt;= #{minMultipleFaceCount}
 			</if>
-			<if
-				test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
-				and t.multipleFaceCount &gt;= #{maxMultipleFaceCount}
+			<if test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
+				and t.multipleFaceCount &lt;= #{maxMultipleFaceCount}
 			</if>
 			<if test="minExceptionCount != null and minExceptionCount != '' or minExceptionCount == 0">
-				and t.exceptionCount &lt;= #{minExceptionCount}
+				and t.exceptionCount &gt;= #{minExceptionCount}
 			</if>
 			<if test="maxExceptionCount != null and maxExceptionCount != '' or maxExceptionCount == 0">
-				and t.exceptionCount &gt;= #{maxExceptionCount}
+				and t.exceptionCount &lt;= #{maxExceptionCount}
 			</if>
 		</where>
-		,(SELECT @i := 0) as i
 		order by t.roomCode
 	</select>