瀏覽代碼

修改错误提示

lideyin 5 年之前
父節點
當前提交
91d12400ee

+ 5 - 6
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/bean/FaceBiopsyStepInfo.java

@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
 
 import javax.persistence.EnumType;
 import javax.persistence.Enumerated;
-import java.util.Date;
 
 /**
  * @Description 人脸活体检测步骤
@@ -39,7 +38,7 @@ public class FaceBiopsyStepInfo implements JsonSerializable {
 	private Boolean result;
 
 	@ApiModelProperty(value = "指令是否超时")
-	private Boolean timeOut;
+	private Boolean timeout;
 
 	@ApiModelProperty(value = "指令执行结果json串")
 	private String resultJson;
@@ -111,11 +110,11 @@ public class FaceBiopsyStepInfo implements JsonSerializable {
 		this.errorMsg = errorMsg;
 	}
 
-	public Boolean getTimeOut() {
-		return timeOut;
+	public Boolean getTimeout() {
+		return timeout;
 	}
 
-	public void setTimeOut(Boolean timeOut) {
-		this.timeOut = timeOut;
+	public void setTimeout(Boolean timeout) {
+		this.timeout = this.timeout;
 	}
 }

+ 1 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamAuditServiceImpl.java

@@ -82,7 +82,7 @@ public class ExamAuditServiceImpl implements ExamAuditService {
             }
 
             //如果有返回实际的活检错误
-            if (StringUtils.isNullOrEmpty(faceBiopsy.getErrorMsg())) {
+            if (!StringUtils.isNullOrEmpty(faceBiopsy.getErrorMsg())) {
                 return faceBiopsy.getErrorMsg();
             }
 

+ 3 - 2
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/FaceBiopsyServiceImpl.java

@@ -297,8 +297,8 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
             }
 
             //如果当前步骤为超时,则直接跳出循环
-            if ((stepInfo.getTimeOut() != null && stepInfo.getTimeOut())) {
-                errorMsg = "未在指定时间内完成指令";
+            if ((stepInfo.getTimeout() != null && stepInfo.getTimeout())) {
+                errorMsg = "超时未完成";
                 finalIsSuccess = false;
                 break;
             }
@@ -323,6 +323,7 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
                     Boolean existsSystemError = Boolean.valueOf(faceCompareResult.get("existsSystemError").toString());
                     //case1.1.有陌生人(即多人脸),不管是否比对成功,直接结束考试
                     if (isStranger) {
+
                         isEndExam = true;
                     }
                     //case1.2.无陌生人且检测失败且不是系统错误(即照片非本人),也直接结束考试