海康的人脸评分改成url方式
This commit is contained in:
parent
34725b6e20
commit
8e1325c9e5
@ -15,7 +15,6 @@ import com.zhgd.xmgl.modules.project.entity.Project;
|
|||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
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.MessageUtil;
|
||||||
import com.zhgd.xmgl.util.PathUtil;
|
import com.zhgd.xmgl.util.PathUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -61,7 +60,8 @@ public class UfaceRecognitionController {
|
|||||||
private HikvisionCall hikvisionCall;
|
private HikvisionCall hikvisionCall;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectMapper projectMapper;
|
private ProjectMapper projectMapper;
|
||||||
|
@Value("${upload.image.url.prefix:}")
|
||||||
|
private String imageUrlPrefix;
|
||||||
|
|
||||||
@ApiOperation(value = "检测人脸照片是否有人脸", notes = "列表查询人脸设备信息", httpMethod = "POST")
|
@ApiOperation(value = "检测人脸照片是否有人脸", notes = "列表查询人脸设备信息", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ -121,7 +121,9 @@ public class UfaceRecognitionController {
|
|||||||
if (StrUtil.isBlank(fileUrl)) {
|
if (StrUtil.isBlank(fileUrl)) {
|
||||||
throw new OpenAlertException("fileUrl不能为空");
|
throw new OpenAlertException("fileUrl不能为空");
|
||||||
}
|
}
|
||||||
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 = hikvisionCall.faceScore(project, param);
|
||||||
if (b) {
|
if (b) {
|
||||||
data.put("checkType", "1");
|
data.put("checkType", "1");
|
||||||
|
|||||||
@ -80,6 +80,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
|
|
||||||
http.authorizeRequests()
|
http.authorizeRequests()
|
||||||
//请求路径允许访问
|
//请求路径允许访问
|
||||||
|
.antMatchers("/xmgl/xzEmergencyType/**").permitAll()
|
||||||
.antMatchers("/xmgl/xzEmergencyRecord/**").permitAll()
|
.antMatchers("/xmgl/xzEmergencyRecord/**").permitAll()
|
||||||
.antMatchers("/xmgl/xzDeductScoreRecord/**").permitAll()
|
.antMatchers("/xmgl/xzDeductScoreRecord/**").permitAll()
|
||||||
.antMatchers("/xmgl/workerInfo/selectWorkerInfoByIdCard").permitAll()
|
.antMatchers("/xmgl/workerInfo/selectWorkerInfoByIdCard").permitAll()
|
||||||
|
|||||||
@ -96,3 +96,5 @@ xiwon.appSecret=b6162078-6f1c-4f2c-8cd5-0873f45199b2
|
|||||||
magic-api.web=/xmgl/magic/web
|
magic-api.web=/xmgl/magic/web
|
||||||
#配置文件存储位置。当以classpath开头时,为只读模式
|
#配置文件存储位置。当以classpath开头时,为只读模式
|
||||||
magic-api.resource.location=C:/jxj/prod/backEnd/itbgpImage/data/magic-api
|
magic-api.resource.location=C:/jxj/prod/backEnd/itbgpImage/data/magic-api
|
||||||
|
#上传的图片的url前缀
|
||||||
|
upload.image.url.prefix=http://192.168.34.221:11111/image/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user