diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/UfaceRecognitionController.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/UfaceRecognitionController.java index 6406f3145..25a420e72 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/UfaceRecognitionController.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/UfaceRecognitionController.java @@ -9,6 +9,7 @@ import com.arcsoft.face.toolkit.ImageInfo; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.execption.OpenAlertException; +import com.zhgd.jeecg.common.util.pass.HttpUtils; import com.zhgd.jeecg.upload.operation.FileOperation; import com.zhgd.xmgl.call.HikvisionCall; import com.zhgd.xmgl.modules.project.entity.Project; @@ -139,8 +140,17 @@ public class UfaceRecognitionController { } param.put("facePicUrl", PathUtil.reviseSlash(url + "/" + fileUrl)); } - boolean b = hikvisionCall.faceScore(project, param); - //boolean b = true; + boolean b = false; + try { + b = hikvisionCall.faceScore(project, param); + } catch (Exception e) { + log.error("" + e); + if (HttpUtils.isTimeOut(e)) { + throw new OpenAlertException("平台连接isc网络异常"); + } else { + throw new OpenAlertException("人脸评分异常"); + } + } if (b) { data.put("checkType", "1"); data.put("message", "成功");