Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
refined-platform
Commits
573ac88b
Commit
573ac88b
authored
May 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务追踪
parent
e7e00b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
...xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
+11
-3
No files found.
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
View file @
573ac88b
package
com.mortals.xhx.module.hik.event.service.impl
;
package
com.mortals.xhx.module.hik.event.service.impl
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DataUtil
;
...
@@ -77,7 +78,7 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
...
@@ -77,7 +78,7 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
@Override
@Override
public
void
saveEventData
(
EventsItem
event
)
{
public
void
saveEventData
(
EventsItem
event
)
{
log
.
info
(
"预约人员识别事件,event
Id:{}"
,
event
.
getEventId
(
));
log
.
info
(
"预约人员识别事件,event
:{}"
,
JSON
.
toJSONString
(
event
));
Double
similarity
=
DataUtil
.
converStr2Double
(
GlobalSysInfo
.
getParamValue
(
ParamKey
.
PARAM_FACE_SIMILARITY
,
"0.8"
),
0
);
Double
similarity
=
DataUtil
.
converStr2Double
(
GlobalSysInfo
.
getParamValue
(
ParamKey
.
PARAM_FACE_SIMILARITY
,
"0.8"
),
0
);
EventData
eventData
=
event
.
getData
();
EventData
eventData
=
event
.
getData
();
//识别结果
//识别结果
...
@@ -91,9 +92,15 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
...
@@ -91,9 +92,15 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
//根据匹配结果 保存业务数据
//根据匹配结果 保存业务数据
if
(
faceMatch
.
getSimilarity
()
>
similarity
)
{
if
(
faceMatch
.
getSimilarity
()
>
similarity
)
{
//判断当前识别是否为注册用户
//判断当前识别是否为注册用户
if
(
ObjectUtils
.
isEmpty
(
faceMatch
.
getCertificate
()))
{
log
.
info
(
"证件号不能为空! faceMatch:{}"
,
JSON
.
toJSONString
(
faceMatch
));
continue
;
}
PersonEntity
personCache
=
personService
.
getExtCache
(
faceMatch
.
getCertificate
());
PersonEntity
personCache
=
personService
.
getExtCache
(
faceMatch
.
getCertificate
());
if
(
ObjectUtils
.
isEmpty
(
personCache
))
{
if
(
ObjectUtils
.
isEmpty
(
personCache
))
{
throw
new
AppException
(
"识别人员未在注册库中!"
);
log
.
info
(
"识别人员未在注册库中!证件号:{}"
,
faceMatch
.
getCertificate
());
continue
;
}
}
//保存人流信息
//保存人流信息
RealtimeDataflowEntity
realtimeDataflowEntity
=
new
RealtimeDataflowEntity
();
RealtimeDataflowEntity
realtimeDataflowEntity
=
new
RealtimeDataflowEntity
();
...
@@ -178,7 +185,6 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
...
@@ -178,7 +185,6 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
monitorAlarm
.
setCreateUserName
(
"system"
);
monitorAlarm
.
setCreateUserName
(
"system"
);
monitorAlarm
.
setCreateUserId
(
1L
);
monitorAlarm
.
setCreateUserId
(
1L
);
monitorAlarmService
.
save
(
monitorAlarm
);
monitorAlarmService
.
save
(
monitorAlarm
);
}
else
{
}
else
{
MonitorAlarmQuery
condition
=
new
MonitorAlarmQuery
();
MonitorAlarmQuery
condition
=
new
MonitorAlarmQuery
();
condition
.
setId
(
monitorAlarm
.
getId
());
condition
.
setId
(
monitorAlarm
.
getId
());
...
@@ -205,6 +211,8 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
...
@@ -205,6 +211,8 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
log
.
info
(
"当前人员:{}已经存在预约业务:{}记录数据"
,
personCache
.
getName
(),
appointmentPersonEntity
.
getBussinessName
());
log
.
info
(
"当前人员:{}已经存在预约业务:{}记录数据"
,
personCache
.
getName
(),
appointmentPersonEntity
.
getBussinessName
());
}
}
}
}
}
else
{
log
.
info
(
"相似度低于设定值 相似度值:{} ,设定阈值:{}"
,
faceMatch
.
getSimilarity
(),
similarity
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment