wangliang 4 роки тому
батько
коміт
8b7e0f2105

+ 4 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamBreachLog.java

@@ -2,6 +2,7 @@ package com.qmth.themis.business.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.qmth.themis.business.base.BaseEntity;
+import com.qmth.themis.business.enums.BreachTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -33,7 +34,7 @@ public class TEExamBreachLog extends BaseEntity {
 
     @ApiModelProperty(value = "类型")
     @TableField(value = "type")
-    private Integer type;
+    private BreachTypeEnum type;
 
     @ApiModelProperty(value = "描述")
     @TableField(value = "description")
@@ -79,11 +80,11 @@ public class TEExamBreachLog extends BaseEntity {
         this.examStudentId = examStudentId;
     }
 
-    public Integer getType() {
+    public BreachTypeEnum getType() {
         return type;
     }
 
-    public void setType(Integer type) {
+    public void setType(BreachTypeEnum type) {
         this.type = type;
     }
 

+ 4 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateExceptionInfo.java

@@ -3,6 +3,7 @@ package com.qmth.themis.business.entity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.qmth.themis.business.enums.ExceptionEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -47,7 +48,7 @@ public class TIeInvigilateExceptionInfo implements Serializable {
 
     @ApiModelProperty(value = "类别")
     @TableField(value = "type")
-    private Integer type;
+    private ExceptionEnum type;
 
     @ApiModelProperty(value = "备注")
     @TableField(value = "remark")
@@ -113,11 +114,11 @@ public class TIeInvigilateExceptionInfo implements Serializable {
         this.info = info;
     }
 
-    public Integer getType() {
+    public ExceptionEnum getType() {
         return type;
     }
 
-    public void setType(Integer type) {
+    public void setType(ExceptionEnum type) {
         this.type = type;
     }
 

+ 7 - 6
themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateWarnInfo.java

@@ -3,6 +3,7 @@ package com.qmth.themis.business.entity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.qmth.themis.business.enums.WarningEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -47,11 +48,11 @@ public class TIeInvigilateWarnInfo implements Serializable {
 
     @ApiModelProperty(value = "预警级别")
     @TableField(value = "level")
-    private Integer level;
+    private String level;
 
     @ApiModelProperty(value = "类别")
     @TableField(value = "type")
-    private Integer type;
+    private WarningEnum type;
 
     @ApiModelProperty(value = "备注")
     @TableField(value = "remark")
@@ -121,19 +122,19 @@ public class TIeInvigilateWarnInfo implements Serializable {
         this.info = info;
     }
 
-    public Integer getLevel() {
+    public String getLevel() {
         return level;
     }
 
-    public void setLevel(Integer level) {
+    public void setLevel(String level) {
         this.level = level;
     }
 
-    public Integer getType() {
+    public WarningEnum getType() {
         return type;
     }
 
-    public void setType(Integer type) {
+    public void setType(WarningEnum type) {
         this.type = type;
     }
 

+ 35 - 0
themis-business/src/main/java/com/qmth/themis/business/enums/BreachTypeEnum.java

@@ -0,0 +1,35 @@
+package com.qmth.themis.business.enums;
+
+/**
+* @Description: 违纪类型 enum
+* @Param:
+* @return:
+* @Author: wangliang
+* @Date: 2020/8/12
+*/
+public enum BreachTypeEnum {
+
+    PLAGIARIZE("夹带抄袭"),
+
+    LOOK_AROUND("左顾右盼"),
+
+    ILLEGAL_ITEMS("考中携带违规物品"),
+
+    TAKER("他人替考"),
+
+    ASSISTANCE("他人协助作答"),
+
+    BLACK_LIST_SOFTWARE("考中使用违规(远程协助、直播等)软件"),
+
+    OTHER("其它");
+
+    private String code;
+
+    private BreachTypeEnum(String code){
+        this.code = code;
+    }
+
+    public String getCode() {
+        return code;
+    }
+}

+ 23 - 0
themis-business/src/main/java/com/qmth/themis/business/enums/WarningEnum.java

@@ -0,0 +1,23 @@
+package com.qmth.themis.business.enums;
+
+/**
+* @Description: 预警类型 enum
+* @Param:
+* @return:
+* @Author: wangliang
+* @Date: 2020/7/29
+*/
+public enum WarningEnum {
+
+    NET_TIME_OUT("网络超时");
+
+    private String code;
+
+    private WarningEnum(String code){
+        this.code = code;
+    }
+
+    public String getCode() {
+        return code;
+    }
+}

+ 8 - 8
themis-business/src/main/resources/db/init.sql

@@ -850,8 +850,8 @@ CREATE TABLE `t_e_exam_breach_log` (
   `exam_activity_id` bigint(20) NOT NULL COMMENT '场次ID',
   `exam_record_id` bigint(20) NOT NULL COMMENT '考试记录ID',
   `exam_student_id` bigint(20) NOT NULL COMMENT '考生id',
-  `type` tinyint(4) DEFAULT NULL COMMENT '类型',
-  `description` varchar(1000) DEFAULT NULL COMMENT '描述',
+  `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型',
+  `description` mediumtext COMMENT '描述',
   `status` tinyint(4) DEFAULT NULL COMMENT '状态,0:处理,1:撤销',
   `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
@@ -1597,9 +1597,9 @@ CREATE TABLE `t_ie_invigilate_exception_info` (
   `exam_activity_id` bigint(20) NOT NULL COMMENT '场次ID',
   `exam_record_id` bigint(20) NOT NULL COMMENT '考试记录ID',
   `exam_student_id` bigint(20) NOT NULL COMMENT '考生id',
-  `info` varchar(1000) DEFAULT NULL COMMENT '异常信息',
-  `type` tinyint(4) DEFAULT NULL COMMENT '类别',
-  `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+  `info` mediumtext COMMENT '异常信息',
+  `type` varchar(30) DEFAULT NULL COMMENT '类别',
+  `remark` mediumtext COMMENT '备注',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
   `update_time` datetime DEFAULT NULL COMMENT '更新时间',
   PRIMARY KEY (`id`)
@@ -1616,9 +1616,9 @@ CREATE TABLE `t_ie_invigilate_warn_info` (
   `exam_record_id` bigint(20) NOT NULL COMMENT '考试记录ID',
   `exam_student_id` bigint(20) NOT NULL COMMENT '考生id',
   `info` varchar(1000) DEFAULT NULL COMMENT '预警信息',
-  `level` tinyint(4) DEFAULT NULL COMMENT '预警级别',
-  `type` tinyint(4) DEFAULT NULL COMMENT '类别',
-  `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+  `level` varchar(30) DEFAULT NULL COMMENT '预警级别',
+  `type` varchar(30) DEFAULT NULL COMMENT '类别',
+  `remark` mediumtext COMMENT '备注',
   `approve_status` tinyint(4) DEFAULT NULL COMMENT '审阅状态,0:未阅,1:已阅',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
   `update_time` datetime DEFAULT NULL COMMENT '更新时间',

+ 2 - 0
themis-common/src/main/java/com/qmth/themis/common/enums/ExceptionResultEnum.java

@@ -118,6 +118,8 @@ public enum ExceptionResultEnum {
 
     FINISH_TYPE_IS_NULL(400, 400045, "考试结束类型不能为空"),
 
+    BREACH_TYPE_IS_NULL(400, 400046, "违纪类型不能为空"),
+
     /**
      * 401
      */