Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
朱海
/
VVAS-PicGroup
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 654dc5e5
authored
Mar 10, 2025
by
朱海
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg]修复male_stage,female_stage为null的问题
1 parent
f555fc5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
View file @
654dc5e
...
@@ -201,8 +201,18 @@ public class PersonRecordServiceImpl implements PersonRecordService {
...
@@ -201,8 +201,18 @@ public class PersonRecordServiceImpl implements PersonRecordService {
for
(
DPersonRecord
dPersonRecord
:
recordList
)
{
for
(
DPersonRecord
dPersonRecord
:
recordList
)
{
//没有匹配到出
//没有匹配到出
if
(
dPersonRecord
.
getLeaveTime
()
==
null
)
{
if
(
dPersonRecord
.
getLeaveTime
()
==
null
)
{
//判断在店内的时间
List
<
DPersonTrackDetail
>
personTrackDetailList
=
dPersonRecord
.
getPersonTrackDetailList
();
if
(
CollectionUtils
.
isEmpty
(
personTrackDetailList
))
{
continue
;
continue
;
}
}
//计算区域的总停留时间,小于10分钟的排除掉
long
totalTime
=
personTrackDetailList
.
stream
().
mapToLong
(
DPersonTrackDetail:
:
getVisitDuration
).
sum
();
if
(
totalTime
<
excludePersonTime
*
60
*
1000
)
{
continue
;
}
}
//排除掉短时间在店内的记录
//排除掉短时间在店内的记录
if
(
dPersonRecord
.
getVisitDuration
()
<
excludePersonTime
*
60
*
1000
)
{
if
(
dPersonRecord
.
getVisitDuration
()
<
excludePersonTime
*
60
*
1000
)
{
continue
;
continue
;
...
@@ -524,14 +534,14 @@ public class PersonRecordServiceImpl implements PersonRecordService {
...
@@ -524,14 +534,14 @@ public class PersonRecordServiceImpl implements PersonRecordService {
updateSta
.
setFemaleCount
(
femaleCount
);
updateSta
.
setFemaleCount
(
femaleCount
);
String
[]
maleStageArry
=
maleStage
.
split
(
","
);
String
[]
maleStageArry
=
maleStage
.
split
(
","
);
L
ong
[]
maleStages
=
strArry2LongArry
(
maleStageArry
);
l
ong
[]
maleStages
=
strArry2LongArry
(
maleStageArry
);
maleStageMap
.
forEach
((
k
,
v
)
->
{
maleStageMap
.
forEach
((
k
,
v
)
->
{
maleStages
[
k
]
=
v
;
maleStages
[
k
]
=
v
;
});
});
String
[]
femaleStageArry
=
femaleStage
.
split
(
","
);
String
[]
femaleStageArry
=
femaleStage
.
split
(
","
);
L
ong
[]
femaleStages
=
strArry2LongArry
(
femaleStageArry
);
l
ong
[]
femaleStages
=
strArry2LongArry
(
femaleStageArry
);
femaleStageMap
.
forEach
((
k
,
v
)
->
{
femaleStageMap
.
forEach
((
k
,
v
)
->
{
femaleStages
[
k
]
=
v
;
femaleStages
[
k
]
=
v
;
});
});
...
@@ -604,13 +614,13 @@ public class PersonRecordServiceImpl implements PersonRecordService {
...
@@ -604,13 +614,13 @@ public class PersonRecordServiceImpl implements PersonRecordService {
updateSta
.
setMaleCount
(
maleCount
);
updateSta
.
setMaleCount
(
maleCount
);
updateSta
.
setFemaleCount
(
femaleCount
);
updateSta
.
setFemaleCount
(
femaleCount
);
updateSta
.
setCounttime
(
DateUtil
.
parse
(
k
,
"yyyy-MM-dd HH:00:00"
));
updateSta
.
setCounttime
(
DateUtil
.
parse
(
k
,
"yyyy-MM-dd HH:00:00"
));
Long
[]
maleStages
=
new
L
ong
[
100
];
long
[]
maleStages
=
new
l
ong
[
100
];
maleStageMap
.
forEach
((
k1
,
v1
)
->
{
maleStageMap
.
forEach
((
k1
,
v1
)
->
{
maleStages
[
k1
]
=
v1
;
maleStages
[
k1
]
=
v1
;
});
});
Long
[]
femaleStages
=
new
L
ong
[
100
];
long
[]
femaleStages
=
new
l
ong
[
100
];
femaleStageMap
.
forEach
((
k1
,
v1
)
->
{
femaleStageMap
.
forEach
((
k1
,
v1
)
->
{
femaleStages
[
k1
]
=
v1
;
femaleStages
[
k1
]
=
v1
;
});
});
...
@@ -693,13 +703,13 @@ public class PersonRecordServiceImpl implements PersonRecordService {
...
@@ -693,13 +703,13 @@ public class PersonRecordServiceImpl implements PersonRecordService {
public
String
arraysToString
(
L
ong
[]
arrays
)
{
public
String
arraysToString
(
l
ong
[]
arrays
)
{
return
Arrays
.
toString
(
arrays
).
substring
(
1
,
Arrays
.
toString
(
arrays
).
length
()
-
1
);
return
Arrays
.
toString
(
arrays
).
substring
(
1
,
Arrays
.
toString
(
arrays
).
length
()
-
1
);
}
}
public
L
ong
[]
strArry2LongArry
(
String
[]
arrays
)
{
public
l
ong
[]
strArry2LongArry
(
String
[]
arrays
)
{
Long
[]
intArrays
=
new
L
ong
[
arrays
.
length
];
long
[]
intArrays
=
new
l
ong
[
arrays
.
length
];
for
(
int
i
=
0
;
i
<
arrays
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
arrays
.
length
;
i
++)
{
intArrays
[
i
]
=
Long
.
parseLong
(
arrays
[
i
].
trim
());
intArrays
[
i
]
=
Long
.
parseLong
(
arrays
[
i
].
trim
());
}
}
...
...
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