Commit 573ac88b authored by 赵啸非's avatar 赵啸非

添加服务追踪

parent e7e00b19
package com.mortals.xhx.module.hik.event.service.impl;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.util.DataUtil;
......@@ -77,7 +78,7 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
@Override
public void saveEventData(EventsItem event) {
log.info("预约人员识别事件,eventId:{}", event.getEventId());
log.info("预约人员识别事件,event:{}", JSON.toJSONString(event));
Double similarity = DataUtil.converStr2Double(GlobalSysInfo.getParamValue(ParamKey.PARAM_FACE_SIMILARITY, "0.8"), 0);
EventData eventData = event.getData();
//识别结果
......@@ -91,9 +92,15 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
//根据匹配结果 保存业务数据
if (faceMatch.getSimilarity() > similarity) {
//判断当前识别是否为注册用户
if (ObjectUtils.isEmpty(faceMatch.getCertificate())) {
log.info("证件号不能为空! faceMatch:{}", JSON.toJSONString(faceMatch));
continue;
}
PersonEntity personCache = personService.getExtCache(faceMatch.getCertificate());
if (ObjectUtils.isEmpty(personCache)) {
throw new AppException("识别人员未在注册库中!");
log.info("识别人员未在注册库中!证件号:{}", faceMatch.getCertificate());
continue;
}
//保存人流信息
RealtimeDataflowEntity realtimeDataflowEntity = new RealtimeDataflowEntity();
......@@ -178,7 +185,6 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
monitorAlarm.setCreateUserName("system");
monitorAlarm.setCreateUserId(1L);
monitorAlarmService.save(monitorAlarm);
} else {
MonitorAlarmQuery condition = new MonitorAlarmQuery();
condition.setId(monitorAlarm.getId());
......@@ -205,6 +211,8 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
log.info("当前人员:{}已经存在预约业务:{}记录数据", personCache.getName(), appointmentPersonEntity.getBussinessName());
}
}
} else {
log.info("相似度低于设定值 相似度值:{} ,设定阈值:{}", faceMatch.getSimilarity(), similarity);
}
}
}
......
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