人脸评分修改
This commit is contained in:
parent
428cecd3f6
commit
1ed9ec8f0a
@ -15,6 +15,7 @@ import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.util.Base64Util;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import com.zhgd.xmgl.util.PathUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -118,12 +119,15 @@ public class UfaceRecognitionController {
|
||||
}
|
||||
JSONObject param = new JSONObject();
|
||||
String fileUrl = MapUtils.getString(map, "fileUrl");
|
||||
if (StrUtil.isBlank(fileUrl)) {
|
||||
throw new OpenAlertException("fileUrl不能为空");
|
||||
String facePicBinaryData = MapUtils.getString(map, "facePicBinaryData");
|
||||
if (StrUtil.isBlank(fileUrl) && StrUtil.isBlank(facePicBinaryData)) {
|
||||
throw new OpenAlertException("fileUrl和facePicBinaryData不能同时为空");
|
||||
}
|
||||
if (StrUtil.isNotBlank(fileUrl)) {
|
||||
param.put("facePicUrl", PathUtil.reviseSlash(imageUrlPrefix + "/" + fileUrl));
|
||||
} else {
|
||||
param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fileUrl)));
|
||||
}
|
||||
//base64可能卡
|
||||
//param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fileUrl)));
|
||||
param.put("facePicUrl", PathUtil.reviseSlash(imageUrlPrefix + "/" + fileUrl));
|
||||
boolean b = hikvisionCall.faceScore(project, param);
|
||||
//boolean b = true;
|
||||
if (b) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user