|
@@ -2,6 +2,7 @@ package com.rshy.project.hy.server;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
+import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -9,6 +10,7 @@ import com.rshy.project.hy.model.entity.RshyJk;
|
|
|
import com.rshy.project.hy.model.enums.HyTypeEnum;
|
|
|
import com.rshy.project.hy.model.enums.PassStatusEnum;
|
|
|
import com.rshy.project.hy.model.enums.SexEnum;
|
|
|
+import com.rshy.project.hy.server.dto.RepositoryDTO;
|
|
|
import com.rshy.project.hy.server.param.RshyParam;
|
|
|
import com.rshy.project.hy.server.param.RshyQuickParam;
|
|
|
import com.rshy.project.hy.server.vo.*;
|
|
@@ -84,9 +86,24 @@ public class RshyServer {
|
|
|
return rshyVo;
|
|
|
}
|
|
|
|
|
|
+ //查询人像库信息
|
|
|
+ RetrievaResultVO repository = faceRetrievaServer.repository();
|
|
|
+ List<RepositoryDTO> dtoList = Convert.toList(RepositoryDTO.class, repository.getResults());
|
|
|
+ Map<String, String> stringMap = MapUtil.newHashMap();
|
|
|
+
|
|
|
+ if(CollectionUtil.isNotEmpty(dtoList)){
|
|
|
+ stringMap = dtoList.stream().collect(Collectors.toMap(RepositoryDTO::getId, RepositoryDTO::getName, (v1, v2) -> v1));
|
|
|
+ }
|
|
|
+
|
|
|
RetrievalRepositoryVO repositoryVO = voList.stream().findFirst().get();
|
|
|
|
|
|
- rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setKind(StrUtil.EMPTY).setWarning(StrUtil.EMPTY).setDisplayMsg("核验不通过").setTts("核验不通过").setHealthCode(StrUtil.EMPTY).setSfzh(repositoryVO.getPersonId())
|
|
|
+ if("1".equals(repositoryVO.getRepository_id())){
|
|
|
+ rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode());
|
|
|
+ }else{
|
|
|
+ rshyVo.setPass(PassStatusEnum.RIGHT_WAY.getCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ rshyVo.setKind(StrUtil.EMPTY).setWarning(stringMap.get(repositoryVO.getRepository_id())).setDisplayMsg("核验不通过").setTts("核验不通过").setHealthCode(StrUtil.EMPTY).setSfzh(repositoryVO.getPersonId())
|
|
|
.setXm(repositoryVO.getName()).setXb(SexEnum.codeOf(repositoryVO.getGender()).getDesc()).setMz(StrUtil.EMPTY).setPhone(StrUtil.EMPTY).setAddress(StrUtil.EMPTY).setPhoto(rshyQuickParam.getPhoto());
|
|
|
return rshyVo;
|
|
|
}
|