Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ca5b6f5c
authored
Nov 05, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add] 事件类型添加
[fix] mall 绑定事件记录 bug 修改
1 parent
23abf342
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
11 deletions
src/main/java/vion/constant/MqttMessageType.java
src/main/java/vion/event/mqtt/MqttClientMessageListener.java
src/main/java/vion/service/impl/monitor/EventServiceImpl.java
src/main/java/vion/constant/MqttMessageType.java
View file @
ca5b6f5
...
@@ -8,11 +8,34 @@ import java.util.Arrays;
...
@@ -8,11 +8,34 @@ import java.util.Arrays;
public
enum
MqttMessageType
{
public
enum
MqttMessageType
{
REGISTER
(
"REGISTER"
),
REGISTER
(
"REGISTER"
),
DEVICE_OFFLINE
(
"DEVICE_OFFLINE"
),
//设备离线
UPGRADE
(
"UPGRADE"
),
UPGRADE
(
"UPGRADE"
),
WHOLEDAY_ANALYZE
(
"WHOLE_ANALYZE_EXCEPTION"
),
//全天分析异常
/**
* store + mall 共有
*/
PASSENGER_FLOW_INTERRUPT
(
"PASSENGER_FLOW_INTERRUPT"
),
//客流数据中断,
DEVICE_OFFLINE
(
"DEVICE_OFFLINE"
),
//设备离线
REID_ANALYZE
(
"REID_EXCEPTION"
),
//全天分析异常
DEVICE_REGISTRATION
(
"DEVICE_REGISTRATION"
),
//设备注册次数异常
DEVICE_REGISTRATION
(
"DEVICE_REGISTRATION"
),
//设备注册次数异常
PASSENGER_FLOW_INTERRUPT
(
"PASSENGER_FLOW_INTERRUPT"
);
//客流数据中断
DEVICE_FEATURE
(
"DEVICE_FEATURE"
),
//设备特征异常
HEADCOUNT_RATIO
(
"HEADCOUNT_RATIO"
),
//人数/人次异常
STAFF_RECOGNIZE
(
"STAFF_RECOGNIZE"
),
//店员识别异常
/**
* store
*/
STORE_CUSTOMER_UNDULATE
(
"STORE_CUSTOMER_UNDULATE"
),
//门店顾客人数波动异常
STORE_GATE_DATA_UNDULATE
(
"STORE_GATE_DATA_UNDULATE"
),
//门店监控点数据波动异常
STORE_INOUT_MATCH_RATIO
(
"STORE_INOUT_MATCH_RATIO"
),
//门店进出匹配率异常
STORE_SINGLE_CLUSTER
(
"STORE_SINGLE_CLUSTER"
),
//门店单聚类异常
STORE_ENTER_RATIO
(
"STORE_ENTER_RATIO"
),
//门店进店率异常
/**
* mall
*/
MALL_INOUT_DIFF
(
"MALL_INOUT_DIFF"
),
//广场进出客流差异异常
MALL_SHOP_INOUT_DIFF
(
"MALL_SHOP_INOUT_DIFF"
),
//广场店铺进出差异异常
MALL_DATA_UNDULATE
(
"MALL_DATA_UNDULATE"
),
//广场数据波动异常
MALL_GATE_DATA_UNDULATE
(
"MALL_GATE_DATA_UNDULATE"
),
//广场外围入口数据波动异常
MALL_SHOP_DATA_UNDULATE
(
"MALL_SHOP_DATA_UNDULATE"
),
//广场店铺数据波动异常
;
private
final
String
type
;
private
final
String
type
;
...
...
src/main/java/vion/event/mqtt/MqttClientMessageListener.java
View file @
ca5b6f5
...
@@ -50,7 +50,7 @@ public class MqttClientMessageListener {
...
@@ -50,7 +50,7 @@ public class MqttClientMessageListener {
//设备离线
//设备离线
handleDeviceOffline
(
jsonObj
.
toString
());
handleDeviceOffline
(
jsonObj
.
toString
());
break
;
break
;
case
MqttMessageType
.
WHOLEDAY
_ANALYZE
:
case
MqttMessageType
.
REID
_ANALYZE
:
//全天分析异常
//全天分析异常
handleWholeDayAnalyze
(
jsonObj
.
toString
());
handleWholeDayAnalyze
(
jsonObj
.
toString
());
break
;
break
;
...
...
src/main/java/vion/service/impl/monitor/EventServiceImpl.java
View file @
ca5b6f5
...
@@ -45,17 +45,16 @@ public class EventServiceImpl extends MPJBaseServiceImpl<EventMapper, Event> imp
...
@@ -45,17 +45,16 @@ public class EventServiceImpl extends MPJBaseServiceImpl<EventMapper, Event> imp
var
eventVOPage
=
this
.
selectJoinListPage
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()),
EventVO
.
class
,
wrapper
);
var
eventVOPage
=
this
.
selectJoinListPage
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()),
EventVO
.
class
,
wrapper
);
Opt
.
ofEmptyAble
(
eventVOPage
.
getRecords
())
Opt
.
ofEmptyAble
(
eventVOPage
.
getRecords
())
.
ifPresent
(
r
->
{
.
ifPresent
(
r
->
{
var
eventUidList
=
r
.
stream
().
map
(
EventVO:
:
getUid
).
toList
();
// fixme data 是字符串
// fixme data 是字符串
/* var eventRecWrapper1 = new MPJLambdaWrapper<EventRecord>()
/* var eventRecWrapper1 = new MPJLambdaWrapper<EventRecord>()
.select("DISTINCT on (
event
_uid) *")
.select("DISTINCT on (
mall
_uid) *")
.
in("event
_uid", eventUidList)
.
eq("mall
_uid", eventUidList)
.orderByDesc("
event
_uid", "create_time");
.orderByDesc("
mall
_uid", "create_time");
var eventRecordList1 = eventRecordService.selectJoinList(EventRecord.class, eventRecWrapper1);*/
var eventRecordList1 = eventRecordService.selectJoinList(EventRecord.class, eventRecWrapper1);*/
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
.
select
(
"DISTINCT on (
event
_uid) *"
)
.
select
(
"DISTINCT on (
mall
_uid) *"
)
.
in
(
"event_uid"
,
eventUidList
)
.
eq
(
"mall_uid"
,
dto
.
getMallUid
()
)
.
orderByDesc
(
"
event
_uid"
,
"create_time"
);
.
orderByDesc
(
"
mall
_uid"
,
"create_time"
);
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
eventUid2SelfMap
=
eventRecordList
.
stream
().
collect
(
Collectors
.
toMap
(
EventRecord:
:
getEventUid
,
Function
.
identity
()));
var
eventUid2SelfMap
=
eventRecordList
.
stream
().
collect
(
Collectors
.
toMap
(
EventRecord:
:
getEventUid
,
Function
.
identity
()));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment