|
@@ -330,26 +330,26 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
|
|
|
throw new ServiceException("照片不符合规则");
|
|
|
}
|
|
|
// 当前group中检索相似人脸
|
|
|
- Map<String, String> searchMap = new LinkedHashMap<>();
|
|
|
- searchMap.put("image", htStr);
|
|
|
- searchMap.put("image_type", "BASE64");
|
|
|
- searchMap.put("group_id_list", SecurityUtils.getAreaCode().substring(0, 6));
|
|
|
- searchMap.put("match_threshold", ResourceUtil.getConfigByName("baidu.similarity"));
|
|
|
- JSONObject searchRes = httpsRequest("https://aip.baidubce.com/rest/2.0/face/v3/search" +
|
|
|
- "?access_token=" + token, "POST", JSONObject.toJSONString(searchMap));
|
|
|
- if (ObjectUtils.isNotEmpty(searchRes) && StringUtils.equals(searchRes.getString("error_msg"), "SUCCESS")) {
|
|
|
- // 存在相似人脸信息
|
|
|
- if (searchRes.getJSONObject("result").getJSONArray("user_list").size() > 0) {
|
|
|
- JSONArray xslr = searchRes.getJSONObject("result").getJSONArray("user_list");
|
|
|
- res.put("lzzt", "2");
|
|
|
- res.put("xslrZjhm", xslr.toJSONString());
|
|
|
- res.put("msg", "存在相似人脸信息");
|
|
|
- return res;
|
|
|
- }
|
|
|
- }
|
|
|
+// Map<String, String> searchMap = new LinkedHashMap<>();
|
|
|
+// searchMap.put("image", htStr);
|
|
|
+// searchMap.put("image_type", "BASE64");
|
|
|
+// searchMap.put("group_id_list", SecurityUtils.getAreaCode().substring(0, 6));
|
|
|
+// searchMap.put("match_threshold", ResourceUtil.getConfigByName("baidu.similarity"));
|
|
|
+// JSONObject searchRes = httpsRequest("https://aip.baidubce.com/rest/2.0/face/v3/search" +
|
|
|
+// "?access_token=" + token, "POST", JSONObject.toJSONString(searchMap));
|
|
|
+// if (ObjectUtils.isNotEmpty(searchRes) && StringUtils.equals(searchRes.getString("error_msg"), "SUCCESS")) {
|
|
|
+// // 存在相似人脸信息
|
|
|
+// if (searchRes.getJSONObject("result").getJSONArray("user_list").size() > 0) {
|
|
|
+// JSONArray xslr = searchRes.getJSONObject("result").getJSONArray("user_list");
|
|
|
+// res.put("lzzt", "2");
|
|
|
+// res.put("xslrZjhm", xslr.toJSONString());
|
|
|
+// res.put("msg", "存在相似人脸信息");
|
|
|
+// return res;
|
|
|
+// }
|
|
|
+// }
|
|
|
res.put("lzzt", "3");
|
|
|
-// res.put("lrTxdb", matchRes.getString("result"));
|
|
|
- res.put("lrTxdb", "89");
|
|
|
+ res.put("lrTxdb", matchRes.getString("result"));
|
|
|
+// res.put("lrTxdb", "89");
|
|
|
res.put("msg", "通过人脸验证");
|
|
|
return res;
|
|
|
}
|
|
@@ -492,8 +492,10 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
|
|
|
@Override
|
|
|
public int updateZwywLrJbxx(InLnstLrxx zwywLrJbxx)
|
|
|
{
|
|
|
+ LnstDeptExamine examine = lnstDeptExamineMapper.selectList(new LambdaQueryWrapper<LnstDeptExamine>()
|
|
|
+ .eq(LnstDeptExamine::getCode, zwywLrJbxx.getLrHjdz())).stream().findFirst().orElse(null);
|
|
|
if (StringUtils.equals(zwywLrJbxx.getLzzt(), "1") || StringUtils.equals(zwywLrJbxx.getLzzt(), "2")
|
|
|
- || StringUtils.equals(zwywLrJbxx.getLzzt(), "5") || StringUtils.equals(zwywLrJbxx.getLzzt(), "7")) {
|
|
|
+ || StringUtils.equals(zwywLrJbxx.getLzzt(), "5") || ObjectUtils.isNotEmpty(examine)) {
|
|
|
ZwywJclrShxx shxx = new ZwywJclrShxx();
|
|
|
BeanUtil.copyProperties(zwywLrJbxx, shxx, new CopyOptions().ignoreNullValue());
|
|
|
if (StringUtils.equals(zwywLrJbxx.getLzzt(), "1")) {
|
|
@@ -503,10 +505,13 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
|
|
|
} else if (StringUtils.equals(zwywLrJbxx.getLzzt(), "5")) {
|
|
|
shxx.setSqyy("特殊材料待审");
|
|
|
} else {
|
|
|
+ zwywLrJbxx.setLzzt("7");
|
|
|
shxx.setSqyy("老人待审核");
|
|
|
}
|
|
|
shxx.setId(IdUtils.simpleUUID());
|
|
|
shxx.setLrId(zwywLrJbxx.getId());
|
|
|
+ shxx.setSqsj(DateUtils.dateTimeNow());
|
|
|
+ shxx.setLzzt(zwywLrJbxx.getLzzt());
|
|
|
zwywJclrShxxMapper.insert(shxx);
|
|
|
}
|
|
|
zwywLrJbxx.setLrHjdz(null);
|