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
bacf56e3
Commit
bacf56e3
authored
Apr 27, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务追踪
parent
59f8655d
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
40 additions
and
50 deletions
+40
-50
refined-manager/src/main/java/com/mortals/xhx/busiz/web/HikCallbackController.java
...java/com/mortals/xhx/busiz/web/HikCallbackController.java
+4
-6
refined-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/SubEventStartedService.java
...xhx/daemon/applicationservice/SubEventStartedService.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/face/service/impl/FacePlanServiceImpl.java
...als/xhx/module/face/service/impl/FacePlanServiceImpl.java
+12
-15
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventReq.java
...als/xhx/module/hik/event/model/req/callback/EventReq.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventsItem.java
...s/xhx/module/hik/event/model/req/callback/EventsItem.java
+5
-3
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/recognition/EventData.java
...e/hik/event/model/req/callback/recognition/EventData.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/recognition/FaceMatchItem.java
...k/event/model/req/callback/recognition/FaceMatchItem.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/recognition/FaceRecognitionResult.java
...model/req/callback/recognition/FaceRecognitionResult.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/recognition/ResInfoItem.java
...hik/event/model/req/callback/recognition/ResInfoItem.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/recognition/Snap.java
...module/hik/event/model/req/callback/recognition/Snap.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/IHikEventService.java
...ortals/xhx/module/hik/event/service/IHikEventService.java
+2
-2
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
...xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
+5
-3
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/EventTypeAbstract.java
.../xhx/module/hik/event/service/impl/EventTypeAbstract.java
+0
-6
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/HikEventServiceImpl.java
...hx/module/hik/event/service/impl/HikEventServiceImpl.java
+1
-5
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/StrangerRecoginze.java
.../xhx/module/hik/event/service/impl/StrangerRecoginze.java
+4
-3
No files found.
refined-manager/src/main/java/com/mortals/xhx/busiz/web/HikCallbackController.java
View file @
bacf56e3
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventRecognBlackReq
;
import
com.mortals.xhx.module.hik.event.service.IHikEventService
;
import
com.mortals.xhx.module.hik.event.service.IHikEventService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -22,13 +20,13 @@ public class HikCallbackController {
...
@@ -22,13 +20,13 @@ public class HikCallbackController {
@PostMapping
(
"eventRcv"
)
@PostMapping
(
"eventRcv"
)
@UnAuth
@UnAuth
public
Rest
<
String
>
refreshMessage
(
@RequestBody
EventRecognBlackReq
req
)
{
public
Rest
<
String
>
refreshMessage
(
@RequestBody
String
req
)
{
log
.
info
(
"【接收事件数据】【请求体】-->
"
+
JSONObject
.
toJSONString
(
req
)
);
log
.
info
(
"【接收事件数据】【请求体】-->
{}"
,
req
);
try
{
try
{
if
(
"OnEventNotify"
.
equals
(
req
.
getMethod
()))
{
/*
if ("OnEventNotify".equals(req.getMethod())) {
Rest<String> rest = hikEventService.handleEvent(req);
Rest<String> rest = hikEventService.handleEvent(req);
return rest;
return rest;
}
}
*/
return
Rest
.
ok
(
"接收成功"
);
return
Rest
.
ok
(
"接收成功"
);
//todo
//todo
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/SubEventStartedService.java
View file @
bacf56e3
...
@@ -63,7 +63,7 @@ public class SubEventStartedService implements IApplicationStartedService {
...
@@ -63,7 +63,7 @@ public class SubEventStartedService implements IApplicationStartedService {
public
void
start
()
{
public
void
start
()
{
ThreadPool
.
getInstance
().
init
(
20
);
ThreadPool
.
getInstance
().
init
(
20
);
log
.
info
(
"开始服务..[事件订阅服务]"
);
log
.
info
(
"开始服务..[事件订阅服务]"
);
String
eventtypes
=
GlobalSysInfo
.
getParamValue
(
Constant
.
PARAM_EVENTTYPES
,
"1
644175361
"
);
String
eventtypes
=
GlobalSysInfo
.
getParamValue
(
Constant
.
PARAM_EVENTTYPES
,
"1
31614,131659,1644175361,1644171265
"
);
List
<
Integer
>
eventTypes
=
StrUtil
.
split
(
eventtypes
,
","
.
charAt
(
0
),
-
1
,
false
,
Integer:
:
parseInt
);
List
<
Integer
>
eventTypes
=
StrUtil
.
split
(
eventtypes
,
","
.
charAt
(
0
),
-
1
,
false
,
Integer:
:
parseInt
);
EventSubReq
eventSubReq
=
new
EventSubReq
();
EventSubReq
eventSubReq
=
new
EventSubReq
();
...
...
refined-manager/src/main/java/com/mortals/xhx/module/face/service/impl/FacePlanServiceImpl.java
View file @
bacf56e3
...
@@ -121,15 +121,10 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
...
@@ -121,15 +121,10 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
//设置监控点
//设置监控点
List
<
String
>
cameraIndexCodes
=
deviceService
.
find
(
new
DeviceQuery
()).
stream
().
distinct
().
map
(
DeviceEntity:
:
getDeviceCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
cameraIndexCodes
=
deviceService
.
find
(
new
DeviceQuery
()).
stream
().
distinct
().
map
(
DeviceEntity:
:
getDeviceCode
).
collect
(
Collectors
.
toList
());
// ArrayList<String> temp = new ArrayList<>();
//temp.add(cameraIndexCodes.get(0));
planRecognWhiteReq
.
setCameraIndexCodes
(
cameraIndexCodes
);
planRecognWhiteReq
.
setCameraIndexCodes
(
cameraIndexCodes
);
//设置识别方式
//设置识别方式
planRecognWhiteReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
planRecognWhiteReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
// List<String> faceGroupIndexCodes = new ArrayList<>();
ResourceReq
resourceReq
=
new
ResourceReq
();
ResourceReq
resourceReq
=
new
ResourceReq
();
resourceReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
resourceReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
Rest
<
List
<
ResourceDataInfo
>>
resourceRecognition
=
hikFaceService
.
getResourceRecognition
(
resourceReq
);
Rest
<
List
<
ResourceDataInfo
>>
resourceRecognition
=
hikFaceService
.
getResourceRecognition
(
resourceReq
);
...
@@ -137,16 +132,8 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
...
@@ -137,16 +132,8 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
ArrayList
<
String
>
recognitionResourceIndexCodes
=
new
ArrayList
<>();
ArrayList
<
String
>
recognitionResourceIndexCodes
=
new
ArrayList
<>();
recognitionResourceIndexCodes
.
add
(
resourceRecognition
.
getData
().
get
(
0
).
getIndexCode
());
recognitionResourceIndexCodes
.
add
(
resourceRecognition
.
getData
().
get
(
0
).
getIndexCode
());
planRecognWhiteReq
.
setRecognitionResourceIndexCodes
(
recognitionResourceIndexCodes
);
planRecognWhiteReq
.
setRecognitionResourceIndexCodes
(
recognitionResourceIndexCodes
);
}
}
// List<String> recognitionResourceIndexCodes = faceGroupPersonService.find(new FaceGroupPersonQuery().faceGroupId(faceGroupEntity.getId())).stream().map(i -> i.getIndexCode()).filter(f -> !ObjectUtils.isEmpty(f)).collect(Collectors.toList());
// ArrayList<String> recognitionResourceIndexCodes = new ArrayList<>();
//temp1.add(recognitionResourceIndexCodes.get(0));
// temp1.add("2c24aa3bb9af4911a269bb887b5502f9");
// temp1.add(recognitionResourceIndexCodes.get(2));
// temp1.add(recognitionResourceIndexCodes.get(3));
// planRecognWhiteReq.setRecognitionResourceIndexCodes(temp1);
//planRecognWhiteReq.setRecognitionResourceIndexCodes(recognitionResourceIndexCodes);
//设置时间段 默认全天候
//设置时间段 默认全天候
if
(
ObjectUtils
.
isEmpty
(
planRecognWhiteInfo
))
{
if
(
ObjectUtils
.
isEmpty
(
planRecognWhiteInfo
))
{
...
@@ -289,7 +276,17 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
...
@@ -289,7 +276,17 @@ public class FacePlanServiceImpl extends AbstractCRUDServiceImpl<FacePlanDao, Fa
List
<
String
>
cameraIndexCodes
=
deviceService
.
find
(
new
DeviceQuery
()).
stream
().
map
(
DeviceEntity:
:
getDeviceCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
cameraIndexCodes
=
deviceService
.
find
(
new
DeviceQuery
()).
stream
().
map
(
DeviceEntity:
:
getDeviceCode
).
collect
(
Collectors
.
toList
());
planRecognBlackReq
.
setCameraIndexCodes
(
cameraIndexCodes
);
planRecognBlackReq
.
setCameraIndexCodes
(
cameraIndexCodes
);
//设置识别方式
//设置识别方式
planRecognBlackReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
FACE_RECOGNITION_SERVER
.
getValue
());
planRecognBlackReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
//设置识别资源
ResourceReq
resourceReq
=
new
ResourceReq
();
resourceReq
.
setRecognitionResourceType
(
RecognitionResourceEnum
.
SUPER_BRAIN
.
getValue
());
Rest
<
List
<
ResourceDataInfo
>>
resourceRecognition
=
hikFaceService
.
getResourceRecognition
(
resourceReq
);
if
(
resourceRecognition
.
getCode
()==
YesNoEnum
.
YES
.
getValue
()&&!
ObjectUtils
.
isEmpty
(
resourceRecognition
.
getData
())){
ArrayList
<
String
>
recognitionResourceIndexCodes
=
new
ArrayList
<>();
recognitionResourceIndexCodes
.
add
(
resourceRecognition
.
getData
().
get
(
0
).
getIndexCode
());
planRecognBlackReq
.
setRecognitionResourceIndexCodes
(
recognitionResourceIndexCodes
);
}
//设置时间段 默认全天候
//设置时间段 默认全天候
AppointmentConfigEntity
appointmentConfigEntity
=
appointmentConfigService
.
selectOne
(
new
AppointmentConfigQuery
());
AppointmentConfigEntity
appointmentConfigEntity
=
appointmentConfigService
.
selectOne
(
new
AppointmentConfigQuery
());
if
(!
ObjectUtils
.
isEmpty
(
appointmentConfigEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
appointmentConfigEntity
))
{
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventRe
cognBlackRe
q.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventReq.java
View file @
bacf56e3
...
@@ -3,7 +3,7 @@ package com.mortals.xhx.module.hik.event.model.req.callback;
...
@@ -3,7 +3,7 @@ package com.mortals.xhx.module.hik.event.model.req.callback;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
EventRe
cognBlackRe
q
{
public
class
EventReq
{
private
String
method
;
private
String
method
;
private
Params
params
;
private
Params
params
;
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventsItem.java
View file @
bacf56e3
...
@@ -2,16 +2,18 @@ package com.mortals.xhx.module.hik.event.model.req.callback;
...
@@ -2,16 +2,18 @@ package com.mortals.xhx.module.hik.event.model.req.callback;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.common.Rest
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
public
class
EventsItem
{
public
class
EventsItem
<
T
>
{
//事件唯一标识
//事件唯一标识
private
String
eventId
;
private
String
eventId
;
//
//
事件数据
private
EventData
data
;
private
T
data
;
//事件类型
//事件类型
private
Integer
eventType
;
private
Integer
eventType
;
//事件源编号,物理设备是资源编号
//事件源编号,物理设备是资源编号
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/EventData.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/
recognition/
EventData.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.model.req.callback
;
package
com.mortals.xhx.module.hik.event.model.req.callback
.recognition
;
import
java.util.List
;
import
java.util.List
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/FaceMatchItem.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/
recognition/
FaceMatchItem.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.model.req.callback
;
package
com.mortals.xhx.module.hik.event.model.req.callback
.recognition
;
import
lombok.Data
;
import
lombok.Data
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/FaceRecognitionResult.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/
recognition/
FaceRecognitionResult.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.model.req.callback
;
package
com.mortals.xhx.module.hik.event.model.req.callback
.recognition
;
import
java.util.List
;
import
java.util.List
;
import
lombok.Data
;
import
lombok.Data
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/ResInfoItem.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/
recognition/
ResInfoItem.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.model.req.callback
;
package
com.mortals.xhx.module.hik.event.model.req.callback
.recognition
;
import
lombok.Data
;
import
lombok.Data
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/Snap.java
→
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/model/req/callback/
recognition/
Snap.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.model.req.callback
;
package
com.mortals.xhx.module.hik.event.model.req.callback
.recognition
;
import
lombok.Data
;
import
lombok.Data
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/IHikEventService.java
View file @
bacf56e3
...
@@ -2,7 +2,7 @@ package com.mortals.xhx.module.hik.event.service;
...
@@ -2,7 +2,7 @@ package com.mortals.xhx.module.hik.event.service;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventRe
cognBlackRe
q
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventReq
;
import
com.mortals.xhx.module.hik.event.model.req.sub.EventSubReq
;
import
com.mortals.xhx.module.hik.event.model.req.sub.EventSubReq
;
import
com.mortals.xhx.module.hik.event.model.rsp.EventInfo
;
import
com.mortals.xhx.module.hik.event.model.rsp.EventInfo
;
...
@@ -45,6 +45,6 @@ public interface IHikEventService {
...
@@ -45,6 +45,6 @@ public interface IHikEventService {
* @param eventRecognBlackReq
* @param eventRecognBlackReq
* @return
* @return
*/
*/
Rest
<
String
>
handleEvent
(
EventRe
cognBlackRe
q
eventRecognBlackReq
);
Rest
<
String
>
handleEvent
(
EventReq
eventRecognBlackReq
);
}
}
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/BlackPlanRecoginze.java
View file @
bacf56e3
...
@@ -12,10 +12,13 @@ import com.mortals.xhx.module.appointment.model.AppointmentPersonEntity;
...
@@ -12,10 +12,13 @@ import com.mortals.xhx.module.appointment.model.AppointmentPersonEntity;
import
com.mortals.xhx.module.appointment.model.AppointmentPersonQuery
;
import
com.mortals.xhx.module.appointment.model.AppointmentPersonQuery
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsQuery
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsQuery
;
import
com.mortals.xhx.module.appointment.service.AppointmentConfigService
;
import
com.mortals.xhx.module.appointment.service.AppointmentPersonService
;
import
com.mortals.xhx.module.appointment.service.AppointmentPersonService
;
import
com.mortals.xhx.module.appointment.service.AppointmentRecordsService
;
import
com.mortals.xhx.module.appointment.service.AppointmentRecordsService
;
import
com.mortals.xhx.module.hik.event.model.req.callback.*
;
import
com.mortals.xhx.module.hik.event.model.req.callback.*
;
import
com.mortals.xhx.module.hik.event.model.req.callback.recognition.EventData
;
import
com.mortals.xhx.module.hik.event.model.req.callback.recognition.FaceMatchItem
;
import
com.mortals.xhx.module.hik.event.model.req.callback.recognition.FaceRecognitionResult
;
import
com.mortals.xhx.module.hik.event.model.req.callback.recognition.Snap
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmEntity
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmEntity
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmQuery
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmQuery
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmRecordEntity
;
import
com.mortals.xhx.module.monitor.model.MonitorAlarmRecordEntity
;
...
@@ -28,8 +31,6 @@ import com.mortals.xhx.module.realtime.service.RealtimeDataflowService;
...
@@ -28,8 +31,6 @@ import com.mortals.xhx.module.realtime.service.RealtimeDataflowService;
import
com.mortals.xhx.utils.SpringUtils
;
import
com.mortals.xhx.utils.SpringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -75,6 +76,7 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
...
@@ -75,6 +76,7 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
@Override
@Override
public
void
saveEventData
(
EventsItem
event
)
{
public
void
saveEventData
(
EventsItem
event
)
{
log
.
info
(
"预约人员识别事件,eventId:{}"
,
event
.
getEventId
());
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
();
//识别结果
//识别结果
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/EventTypeAbstract.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.service.impl
;
package
com.mortals.xhx.module.hik.event.service.impl
;
import
cn.hutool.core.util.ReflectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.xhx.common.code.HikEventTypeEnum
;
import
com.mortals.xhx.common.code.HikEventTypeEnum
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventData
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventsItem
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventsItem
;
import
java.util.Date
;
/**
/**
* @author:
* @author:
* @date: 2023/4/17 9:22
* @date: 2023/4/17 9:22
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/HikEventServiceImpl.java
View file @
bacf56e3
...
@@ -8,7 +8,6 @@ import com.mortals.framework.ap.GlobalSysInfo;
...
@@ -8,7 +8,6 @@ import com.mortals.framework.ap.GlobalSysInfo;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.xhx.common.code.HikAbilityEnum
;
import
com.mortals.xhx.common.code.HikAbilityEnum
;
import
com.mortals.xhx.common.code.HikEventTypeEnum
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.module.hik.AbstractHikService
;
import
com.mortals.xhx.module.hik.AbstractHikService
;
import
com.mortals.xhx.module.hik.HikApiRest
;
import
com.mortals.xhx.module.hik.HikApiRest
;
...
@@ -17,15 +16,12 @@ import com.mortals.xhx.module.hik.event.model.req.sub.EventSubReq;
...
@@ -17,15 +16,12 @@ import com.mortals.xhx.module.hik.event.model.req.sub.EventSubReq;
import
com.mortals.xhx.module.hik.event.model.rsp.EventInfo
;
import
com.mortals.xhx.module.hik.event.model.rsp.EventInfo
;
import
com.mortals.xhx.module.hik.event.service.IHikEventService
;
import
com.mortals.xhx.module.hik.event.service.IHikEventService
;
import
com.mortals.xhx.module.person.service.PersonService
;
import
com.mortals.xhx.module.person.service.PersonService
;
import
com.mortals.xhx.module.realtime.model.RealtimeDataflowEntity
;
import
com.mortals.xhx.module.realtime.service.RealtimeDataflowService
;
import
com.mortals.xhx.module.realtime.service.RealtimeDataflowService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 海康人员接口类
* 海康人员接口类
...
@@ -107,7 +103,7 @@ public class HikEventServiceImpl extends AbstractHikService implements IHikEvent
...
@@ -107,7 +103,7 @@ public class HikEventServiceImpl extends AbstractHikService implements IHikEvent
}
}
@Override
@Override
public
Rest
<
String
>
handleEvent
(
EventRe
cognBlackRe
q
req
)
{
public
Rest
<
String
>
handleEvent
(
EventReq
req
)
{
//处理识别业务 todo
//处理识别业务 todo
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
);
//String similarity = GlobalSysInfo.getParamValue(ParamKey.PARAM_FACE_SIMILARITY, "0.8");
//String similarity = GlobalSysInfo.getParamValue(ParamKey.PARAM_FACE_SIMILARITY, "0.8");
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/event/service/impl/StrangerRecoginze.java
View file @
bacf56e3
package
com.mortals.xhx.module.hik.event.service.impl
;
package
com.mortals.xhx.module.hik.event.service.impl
;
import
com.mortals.xhx.common.code.HikEventTypeEnum
;
import
com.mortals.xhx.common.code.HikEventTypeEnum
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventData
;
import
com.mortals.xhx.module.hik.event.model.req.callback.
recognition.
EventData
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventsItem
;
import
com.mortals.xhx.module.hik.event.model.req.callback.EventsItem
;
import
com.mortals.xhx.module.hik.event.model.req.callback.FaceRecognitionResult
;
import
com.mortals.xhx.module.hik.event.model.req.callback.
recognition.
FaceRecognitionResult
;
import
com.mortals.xhx.module.hik.event.model.req.callback.Snap
;
import
com.mortals.xhx.module.hik.event.model.req.callback.
recognition.
Snap
;
import
com.mortals.xhx.module.realtime.model.RealtimeDataflowEntity
;
import
com.mortals.xhx.module.realtime.model.RealtimeDataflowEntity
;
import
com.mortals.xhx.module.realtime.service.RealtimeDataflowService
;
import
com.mortals.xhx.module.realtime.service.RealtimeDataflowService
;
import
com.mortals.xhx.utils.SpringUtils
;
import
com.mortals.xhx.utils.SpringUtils
;
...
@@ -37,6 +37,7 @@ public class StrangerRecoginze extends EventTypeAbstract {
...
@@ -37,6 +37,7 @@ public class StrangerRecoginze extends EventTypeAbstract {
@Override
@Override
public
void
saveEventData
(
EventsItem
event
)
{
public
void
saveEventData
(
EventsItem
event
)
{
log
.
info
(
"处理陌生人事件,eventId:{}"
,
event
.
getEventId
());
EventData
eventData
=
event
.
getData
();
EventData
eventData
=
event
.
getData
();
//识别结果
//识别结果
FaceRecognitionResult
faceRecognitionResult
=
eventData
.
getFaceRecognitionResult
();
FaceRecognitionResult
faceRecognitionResult
=
eventData
.
getFaceRecognitionResult
();
...
...
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