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 3181f3a6
authored
Aug 15, 2025
by
zhuhaitao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg]临时给屈臣氏用,移除汽车排除的接待记录相关逻辑;
1 parent
44b39962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
45 deletions
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
View file @
3181f3a
...
...
@@ -199,49 +199,49 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List
<
DPersonRecord
>
personRecordList
=
new
ArrayList
<>();
for
(
DPersonRecord
dPersonRecord
:
recordList
)
{
//没有匹配到出
if
(
dPersonRecord
.
getLeaveTime
()
==
null
)
{
//判断在店内的时间
List
<
DPersonTrackDetail
>
personTrackDetailList
=
dPersonRecord
.
getPersonTrackDetailList
();
if
(
CollectionUtils
.
isEmpty
(
personTrackDetailList
))
{
continue
;
}
//计算区域的总停留时间,小于10分钟的排除掉
long
totalTime
=
personTrackDetailList
.
stream
().
mapToLong
(
DPersonTrackDetail:
:
getVisitDuration
).
sum
();
if
(
needFilter
&&
totalTime
<
excludePersonTime
*
60
*
1000
)
{
continue
;
}
}
//排除掉短时间在店内的记录
if
(
needFilter
&&
dPersonRecord
.
getVisitDuration
()
<
excludePersonTime
*
60
*
1000
)
{
continue
;
}
if
(
strictMode
)
{
log
.
info
(
"门店:{}严格模式过滤"
,
mallId
);
// 严格模式,没接待,或没看车,就过滤
if
(
filterAttention
==
1
)
{
// if (dPersonRecord.getReceptionCount() == 0) {
// if (dPersonRecord.getLeaveTime() == null) {
// //判断在店内的时间
// List<DPersonTrackDetail> personTrackDetailList = dPersonRecord.getPersonTrackDetailList();
// if (CollectionUtils.isEmpty(personTrackDetailList)) {
// continue;
// }
// //计算区域的总停留时间,小于10分钟的排除掉
// long totalTime = personTrackDetailList.stream().mapToLong(DPersonTrackDetail::getVisitDuration).sum();
// if (needFilter && totalTime < excludePersonTime * 60 * 1000) {
// continue;
// }
//
// }
// //排除掉短时间在店内的记录
// if (needFilter && dPersonRecord.getVisitDuration() < excludePersonTime * 60 * 1000) {
// continue;
// }
// if (strictMode) {
// log.info("门店:{}严格模式过滤", mallId);
// // 严格模式,没接待,或没看车,就过滤
// if (filterAttention == 1) {
//// if (dPersonRecord.getReceptionCount() == 0) {
//// continue;
//// }
// List<DPersonTrackDetail> personTrackDetailList = dPersonRecord.getPersonTrackDetailList();
// if (CollectionUtils.isEmpty(personTrackDetailList)) {
// continue;
// }
List
<
DPersonTrackDetail
>
personTrackDetailList
=
dPersonRecord
.
getPersonTrackDetailList
();
if
(
CollectionUtils
.
isEmpty
(
personTrackDetailList
))
{
continue
;
}
List
<
DPersonTrackDetail
>
attentionList
=
personTrackDetailList
.
stream
().
filter
(
v
->
v
.
getVisitDuration
()
!=
null
&&
v
.
getVisitDuration
()
>
strictModeAttentionSecond
*
1000L
)
.
sorted
(
Comparator
.
comparing
(
DPersonTrackDetail:
:
getArriveTime
)).
toList
();
if
(
attentionList
.
isEmpty
())
{
continue
;
}
dPersonRecord
.
setAttentionCount
(
attentionList
.
size
());
dPersonRecord
.
setAttentionTime
(
attentionList
.
get
(
0
).
getArriveTime
());
}
}
else
{
//没有被接待,并且没有看车的排除掉
if
(
dPersonRecord
.
getReceptionCount
()
==
0
&&
filterAttention
==
1
&&
dPersonRecord
.
getAttentionCount
()
==
0
)
{
continue
;
}
}
// List<DPersonTrackDetail> attentionList = personTrackDetailList.stream().filter(v -> v.getVisitDuration() != null && v.getVisitDuration() > strictModeAttentionSecond * 1000L)
// .sorted(Comparator.comparing(DPersonTrackDetail::getArriveTime)).toList();
// if (attentionList.isEmpty()) {
// continue;
// }
// dPersonRecord.setAttentionCount(attentionList.size());
// dPersonRecord.setAttentionTime(attentionList.get(0).getArriveTime());
// }
// } else {
// //没有被接待,并且没有看车的排除掉
// if (dPersonRecord.getReceptionCount() == 0 && filterAttention == 1 && dPersonRecord.getAttentionCount() == 0) {
// continue;
// }
// }
personRecordList
.
add
(
dPersonRecord
);
dPersonRecordDao
.
createDPersonRecordBatch
(
Collections
.
singletonList
(
dPersonRecord
));
if
(!
CollectionUtils
.
isEmpty
(
dPersonRecord
.
getPersonTrackDetailList
()))
{
...
...
@@ -584,10 +584,11 @@ public class PersonRecordServiceImpl implements PersonRecordService {
CustomerGroupResult
customerGroupResult
=
new
CustomerGroupResult
();
List
<
DPersonRecord
>
visitorsGroupRecordList
=
personRecordMap
.
values
().
stream
().
toList
();
Set
<
String
>
nonEffectVisitorsUnids
=
nonEffectVisitorsUnids
(
visitorsGroupRecordList
,
effectVisitorsConfig
);
List
<
DPersonRecord
>
effectVisitorsRecord
=
nonEffectVisitorsUnids
.
isEmpty
()
?
visitorsGroupRecordList
:
visitorsGroupRecordList
.
stream
().
filter
(
r
->
!
nonEffectVisitorsUnids
.
contains
(
r
.
getPersonUnid
())).
toList
();
Map
<
String
,
List
<
DPersonRecord
>>
groupMap
=
effectVisitorsRecord
.
stream
().
collect
(
Collectors
.
groupingBy
(
DPersonRecord:
:
getGroupUnid
));
// Set<String> nonEffectVisitorsUnids = nonEffectVisitorsUnids(visitorsGroupRecordList, effectVisitorsConfig);
// List<DPersonRecord> effectVisitorsRecord = nonEffectVisitorsUnids.isEmpty() ? visitorsGroupRecordList
// : visitorsGroupRecordList.stream().filter(r -> !nonEffectVisitorsUnids.contains(r.getPersonUnid())).toList();
// Map<String, List<DPersonRecord>> groupMap = effectVisitorsRecord.stream().collect(Collectors.groupingBy(DPersonRecord::getGroupUnid));
Map
<
String
,
List
<
DPersonRecord
>>
groupMap
=
visitorsGroupRecordList
.
stream
().
collect
(
Collectors
.
groupingBy
(
DPersonRecord:
:
getGroupUnid
));
groupMap
.
forEach
((
k
,
v
)
->
{
calGroup
(
1
,
customerGroupResult
,
v
);
});
...
...
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