wangliang 4 yıl önce
ebeveyn
işleme
670b8b2b1c

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListDetailBean.java

@@ -359,6 +359,17 @@ public class InvigilateListDetailBean implements Serializable {
         @ApiModelProperty(value = "创建时间")
         @ApiModelProperty(value = "创建时间")
         private Date createTime;
         private Date createTime;
 
 
+        @ApiModelProperty(value = "处理时差,单位秒")
+        private Integer difference;
+
+        public Integer getDifference() {
+            return difference;
+        }
+
+        public void setDifference(Integer difference) {
+            this.difference = difference;
+        }
+
         public String getInfo() {
         public String getInfo() {
             return info;
             return info;
         }
         }

+ 14 - 2
themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateExceptionInfo.java

@@ -63,11 +63,15 @@ public class TIeInvigilateExceptionInfo implements Serializable {
     @TableField(value = "update_time", fill = FieldFill.UPDATE)
     @TableField(value = "update_time", fill = FieldFill.UPDATE)
     private Date updateTime;
     private Date updateTime;
 
 
+    @ApiModelProperty(value = "处理时差,单位秒")
+    @TableField(value = "difference")
+    private Integer difference;
+
     public TIeInvigilateExceptionInfo() {
     public TIeInvigilateExceptionInfo() {
 
 
     }
     }
 
 
-    public TIeInvigilateExceptionInfo(Long examId, Long examActivityId, Long examRecordId, Long examStudentId, String info, ExceptionEnum type,String remark) {
+    public TIeInvigilateExceptionInfo(Long examId, Long examActivityId, Long examRecordId, Long examStudentId, String info, ExceptionEnum type,Integer difference) {
         this.id = Constants.idGen.next();
         this.id = Constants.idGen.next();
         this.examId = examId;
         this.examId = examId;
         this.examActivityId = examActivityId;
         this.examActivityId = examActivityId;
@@ -75,7 +79,15 @@ public class TIeInvigilateExceptionInfo implements Serializable {
         this.examStudentId = examStudentId;
         this.examStudentId = examStudentId;
         this.info = info;
         this.info = info;
         this.type = type;
         this.type = type;
-        this.remark = remark;
+        this.difference = difference;
+    }
+
+    public Integer getDifference() {
+        return difference;
+    }
+
+    public void setDifference(Integer difference) {
+        this.difference = difference;
     }
     }
 
 
     public static long getSerialVersionUID() {
     public static long getSerialVersionUID() {

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

@@ -1295,6 +1295,7 @@ CREATE TABLE `t_ie_invigilate_exception_info` (
   `remark` mediumtext COMMENT '备注',
   `remark` mediumtext COMMENT '备注',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
   `update_time` datetime DEFAULT NULL COMMENT '更新时间',
   `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `difference` int(11) DEFAULT NULL COMMENT '处理时差,单位秒',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监考异常信息';
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监考异常信息';
 
 

+ 4 - 4
themis-mq/src/main/java/com/qmth/themis/mq/service/impl/MqLogicServiceImpl.java

@@ -222,7 +222,7 @@ public class MqLogicServiceImpl implements MqLogicService {
         if (Objects.nonNull(objectMap)) {
         if (Objects.nonNull(objectMap)) {
             Integer diff = 0;
             Integer diff = 0;
             if (Objects.nonNull(clientLastSyncTime)) {//大于等于当前时间,说明未重连或重登录
             if (Objects.nonNull(clientLastSyncTime)) {//大于等于当前时间,说明未重连或重登录
-                Long l = (System.currentTimeMillis() - clientLastSyncTime.getTime()) / 1000 / 60;
+                Long l = (System.currentTimeMillis() - clientLastSyncTime.getTime()) / 1000;
                 if (l >= 2 && !Objects.equals(objectMap.get("status"), ExamRecordStatusEnum.FINISHED)) {
                 if (l >= 2 && !Objects.equals(objectMap.get("status"), ExamRecordStatusEnum.FINISHED)) {
                     diff = l.intValue();
                     diff = l.intValue();
                     //是否增加断点记录或者交卷处理统一放登录逻辑里处理,这里只更新考试记录状态为中断
                     //是否增加断点记录或者交卷处理统一放登录逻辑里处理,这里只更新考试记录状态为中断
@@ -234,7 +234,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             Long examId = Long.parseLong(String.valueOf(objectMap.get("examId")));
             Long examId = Long.parseLong(String.valueOf(objectMap.get("examId")));
             Long examActivityId = Long.parseLong(String.valueOf(objectMap.get("examActivityId")));
             Long examActivityId = Long.parseLong(String.valueOf(objectMap.get("examActivityId")));
             Long examStudentId = Long.parseLong(String.valueOf(objectMap.get("examStudentId")));
             Long examStudentId = Long.parseLong(String.valueOf(objectMap.get("examStudentId")));
-            TIeInvigilateExceptionInfo tIeInvigilateExceptionInfo = new TIeInvigilateExceptionInfo(examId, examActivityId, recordId, examStudentId, ExceptionEnum.NET_TIME_OUT.getCode(), ExceptionEnum.NET_TIME_OUT, String.valueOf(diff));
+            TIeInvigilateExceptionInfo tIeInvigilateExceptionInfo = new TIeInvigilateExceptionInfo(examId, examActivityId, recordId, examStudentId, ExceptionEnum.NET_TIME_OUT.getCode(), ExceptionEnum.NET_TIME_OUT, diff);
             tIeInvigilateExceptionInfoService.saveOrUpdate(tIeInvigilateExceptionInfo);
             tIeInvigilateExceptionInfoService.saveOrUpdate(tIeInvigilateExceptionInfo);
         }
         }
         TMRocketMessage tmRocketMessage = gson.fromJson(gson.toJson(mqDto), TMRocketMessage.class);
         TMRocketMessage tmRocketMessage = gson.fromJson(gson.toJson(mqDto), TMRocketMessage.class);
@@ -447,7 +447,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             Date clientLastSyncTime = ExamRecordCacheUtil.getClientLastSyncTime(recordId);
             Date clientLastSyncTime = ExamRecordCacheUtil.getClientLastSyncTime(recordId);
             Integer diff = 0;
             Integer diff = 0;
             if (Objects.nonNull(clientLastSyncTime)) {
             if (Objects.nonNull(clientLastSyncTime)) {
-                Long l = ((System.currentTimeMillis() - clientLastSyncTime.getTime()) / 1000 / 60);
+                Long l = ((System.currentTimeMillis() - clientLastSyncTime.getTime()) / 1000);
                 diff = l.intValue();
                 diff = l.intValue();
             }
             }
 
 
@@ -500,7 +500,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             //增加异常日志
             //增加异常日志
             Long examId = Long.parseLong(String.valueOf(objectMap.get("examId")));
             Long examId = Long.parseLong(String.valueOf(objectMap.get("examId")));
             Long examActivityId = Long.parseLong(String.valueOf(objectMap.get("examActivityId")));
             Long examActivityId = Long.parseLong(String.valueOf(objectMap.get("examActivityId")));
-            TIeInvigilateExceptionInfo tIeInvigilateExceptionInfo = new TIeInvigilateExceptionInfo(examId, examActivityId, recordId, examStudentId, String.valueOf(jsonObject.getJSONObject("reason").get("reason")), exceptionEnum, String.valueOf(diff));
+            TIeInvigilateExceptionInfo tIeInvigilateExceptionInfo = new TIeInvigilateExceptionInfo(examId, examActivityId, recordId, examStudentId, String.valueOf(jsonObject.getJSONObject("reason").get("reason")), exceptionEnum, diff);
             tIeInvigilateExceptionInfoService.saveOrUpdate(tIeInvigilateExceptionInfo);
             tIeInvigilateExceptionInfoService.saveOrUpdate(tIeInvigilateExceptionInfo);
         } else if (tag.contains(MqTagEnum.WARNING_LOG.name())) {//考试预警日志
         } else if (tag.contains(MqTagEnum.WARNING_LOG.name())) {//考试预警日志