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
3e991f0e
Commit
3e991f0e
authored
Sep 26, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消费海康回调函数
parent
51789065
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
refined-manager/src/main/java/com/mortals/xhx/busiz/web/TestController.java
...c/main/java/com/mortals/xhx/busiz/web/TestController.java
+8
-15
No files found.
refined-manager/src/main/java/com/mortals/xhx/busiz/web/TestController.java
View file @
3e991f0e
...
...
@@ -111,7 +111,7 @@ public class TestController {
public
String
mockStatData
()
{
ArrayList
<
RealtimeDataflowStatEntity
>
statEntities
=
new
ArrayList
<>();
//模拟构造过去人流数据
DateTime
startDateTime
=
DateUtil
.
parseDate
(
"202
3-03-01
"
);
DateTime
startDateTime
=
DateUtil
.
parseDate
(
"202
4-07-20
"
);
DateTime
endDateTime
=
DateUtil
.
date
();
Integer
subDay
=
Integer
.
parseInt
(
String
.
valueOf
(
DateUtil
.
betweenDay
(
startDateTime
,
endDateTime
,
false
)));
...
...
@@ -143,7 +143,7 @@ public class TestController {
statEntity
.
initAttrValue
();
statEntity
.
setSiteId
(
1L
);
statEntity
.
setSiteName
(
"宜宾市民中心"
);
if
(
j
>
8
&&
j
<
18
)
{
if
(
j
>
8
&&
j
<
18
)
{
//随机500~1200人
int
total
=
RandomUtil
.
randomInt
(
400
,
1200
);
statEntity
.
setPersonSum
(
total
);
...
...
@@ -173,13 +173,12 @@ public class TestController {
}
@GetMapping
(
"mockFlowData"
)
@UnAuth
public
String
mockFlowData
()
{
List
<
RealtimeDataflowEntity
>
flowEntities
=
new
ArrayList
<>();
//模拟构造过去人流数据
DateTime
startDateTime
=
DateUtil
.
parseDate
(
"2024-0
3-01
"
);
DateTime
startDateTime
=
DateUtil
.
parseDate
(
"2024-0
7-20
"
);
DateTime
endDateTime
=
DateUtil
.
date
();
Integer
subDay
=
Integer
.
parseInt
(
String
.
valueOf
(
DateUtil
.
betweenDay
(
startDateTime
,
endDateTime
,
false
)));
...
...
@@ -187,26 +186,21 @@ public class TestController {
for
(
int
i
=
0
;
i
<=
subDay
;
i
++)
{
DateTime
date
=
DateUtil
.
offsetDay
(
startDateTime
,
i
);
boolean
weekend
=
DateUtil
.
isWeekend
(
date
);
if
(
weekend
)
{
if
(
!
weekend
)
{
//周末 默认数据
for
(
int
j
=
0
;
j
<=
23
;
j
++)
{
RealtimeDataflowStatEntity
statEntity
=
new
RealtimeDataflowStatEntity
();
statEntity
.
initAttrValue
();
statEntity
.
setSiteId
(
1L
);
statEntity
.
setSiteName
(
"宜宾市民中心"
);
int
randomInt
=
RandomUtil
.
randomInt
(
100
,
1000
);
for
(
int
j
=
0
;
j
<=
randomInt
;
j
++)
{
RealtimeDataflowEntity
realtimeDataflowEntity
=
new
RealtimeDataflowEntity
();
realtimeDataflowEntity
.
initAttrValue
();
realtimeDataflowEntity
.
setSiteId
(
1L
);
realtimeDataflowEntity
.
setSiteName
(
"宜宾市民中心"
);
realtimeDataflowEntity
.
setDetectTime
(
DateUtil
.
offsetHour
(
date
,
j
));
realtimeDataflowEntity
.
setDevice
(
RandomUtil
.
randomString
(
10
));
realtimeDataflowEntity
.
setPicUri
(
""
);
realtimeDataflowEntity
.
setEventId
(
RandomUtil
.
randomString
(
10
));
realtimeDataflowEntity
.
setEventType
(
HikEventTypeEnum
.
陌生人员识别事件
.
getValue
().
longValue
());
realtimeDataflowEntity
.
setCreateUserId
(
1L
);
realtimeDataflowEntity
.
setCreateTime
(
DateUtil
.
offsetHour
(
date
,
j
)
);
realtimeDataflowEntity
.
setCreateTime
(
date
);
realtimeDataflowEntity
.
setCreateUserName
(
"system"
);
flowEntities
.
add
(
realtimeDataflowEntity
);
...
...
@@ -224,7 +218,7 @@ public class TestController {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
str
=
"admin"
;
String
str
=
"admin"
;
System
.
out
.
println
(
SecurityUtil
.
md5DoubleEncoding
(
str
));
byte
[]
md5s
=
SecurityUtil
.
getDigest
(
str
,
"MD5"
);
...
...
@@ -243,7 +237,6 @@ public class TestController {
System
.
out
.
println
(
HexUtil
.
encodeHex
(
md5s1
));
}
...
...
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