Commit bdeeee4f authored by 赵啸非's avatar 赵啸非

添加用户类型修改

parent ac05c629
...@@ -138,7 +138,20 @@ public class TestController { ...@@ -138,7 +138,20 @@ public class TestController {
if (!ObjectUtils.isEmpty(staffEntity.getPicUri())) { if (!ObjectUtils.isEmpty(staffEntity.getPicUri())) {
ImgReq imgReq = new ImgReq(); ImgReq imgReq = new ImgReq();
imgReq.setUrl(staffEntity.getPicUri()); imgReq.setUrl(staffEntity.getPicUri());
Rest<String> rest = faceService.downloadPicture(imgReq); imgReq.setServerIndexCode(staffEntity.getServerIndexCode());
//Rest<String> rest = faceService.downloadPicture(imgReq);
try {
InputStream in = faceService.callPostImgs(imgReq);
if (!ObjectUtils.isEmpty(in)) {
MultipartFile file = ServletUtils.getMultipartFile(in, "snap.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload/snap/" + DateUtil.today(), null);
staffEntity.setPhotoPath(filePath);
updateList.add(staffEntity);
}
} catch (Exception e) {
log.error("下载出错");
}
/*
if (YesNoEnum.YES.getValue() == rest.getCode()) { if (YesNoEnum.YES.getValue() == rest.getCode()) {
byte[] bytes = Base64.decode(rest.getData()); byte[] bytes = Base64.decode(rest.getData());
if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) { if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) {
...@@ -151,7 +164,7 @@ public class TestController { ...@@ -151,7 +164,7 @@ public class TestController {
} }
} else { } else {
log.info("download:{}", JSON.toJSONString(rest)); log.info("download:{}", JSON.toJSONString(rest));
} }*/
} }
} }
if (!ObjectUtils.isEmpty(updateList)) { if (!ObjectUtils.isEmpty(updateList)) {
......
...@@ -5,7 +5,7 @@ import lombok.Data; ...@@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class ImgReq { public class ImgReq {
private String svrIndexCode; private String serverIndexCode;
private String picUri; private String picUri;
......
package com.mortals.xhx.module.hik.face.service;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognListReq;
import com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognReq;
import com.mortals.xhx.module.hik.face.model.rsp.plan.PlanRecognInfo;
import java.util.List;
/**
* 海康门禁接口对接类
*
* @author:
* @date: 2023/4/12 17:47
*/
public interface IHikPlanService {
/**
* 查询重点识别计划
*
* @param planRecognListReq
* @return
*/
Rest<List<PlanRecognInfo>> findPlanRecognBlackList(PlanRecognListReq planRecognListReq);
/**
* 添加人员监视计划
*
* @param planRecognReq
* @return
*/
Rest<String> planRecognBlackAdd(PlanRecognReq planRecognReq);
/**
* 人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognBlackDel(PlanRecognReq planRecognReq);
/**
* 查询陌生人识别计划
*
* @param planRecognListReq
* @return
*/
Rest<List<PlanRecognInfo>> findPlanRecognWhiteList(PlanRecognListReq planRecognListReq);
/**
* 添加陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest<String> planRecognWhiteAdd(PlanRecognReq planRecognReq);
/**
* 更新陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteUpdate(PlanRecognReq planRecognReq);
/**
* 陌生人人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteDel(PlanRecognReq planRecognReq);
/**
* 陌生人监视计划重新下发
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteReStart(PlanRecognReq planRecognReq);
}
...@@ -269,7 +269,7 @@ public class HikFaceServiceImpl extends AbstractHikService implements IHikFaceSe ...@@ -269,7 +269,7 @@ public class HikFaceServiceImpl extends AbstractHikService implements IHikFaceSe
@Override @Override
public InputStream callPostImgs(ImgReq imgReq) throws Exception { public InputStream callPostImgs(ImgReq imgReq) throws Exception {
ArtemisConfig config = getArtemisConfig(); ArtemisConfig config = getArtemisConfig();
String getSecurityApi = ARTEMIS_PATH + "/api/visitor/v1/record/pictures"; String getSecurityApi = ARTEMIS_PATH + "/api/resource/v1/person/";
path.put(protocol, getSecurityApi); path.put(protocol, getSecurityApi);
//ArtemisHttpUtil.doPostStringImgArtemis(config, path, JSON.toJSONString(recognReq), null, null, "application/json"); //ArtemisHttpUtil.doPostStringImgArtemis(config, path, JSON.toJSONString(recognReq), null, null, "application/json");
Map<String, String> query = new HashMap<String, String>(2) { //get请求的head参数 Map<String, String> query = new HashMap<String, String>(2) { //get请求的head参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment