Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
vion-label
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 67b0423e
authored
Sep 17, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
搜索结果排序
1 parent
f18285fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
label-platform/src/main/java/com/viontech/label/platform/service/main/ReidService.java
label-platform/src/main/java/com/viontech/label/platform/service/main/ReidService.java
View file @
67b0423
...
@@ -459,8 +459,19 @@ public class ReidService {
...
@@ -459,8 +459,19 @@ public class ReidService {
options
.
put
(
"agg"
,
true
);
options
.
put
(
"agg"
,
true
);
CompletableFuture
<
AlgResult
>
future
=
matchClient
.
matchPerson
(
2
,
person
,
reidPoolName
,
Collections
.
emptyList
(),
options
);
CompletableFuture
<
AlgResult
>
future
=
matchClient
.
matchPerson
(
2
,
person
,
reidPoolName
,
Collections
.
emptyList
(),
options
);
AlgResult
result
=
future
.
get
();
AlgResult
result
=
future
.
get
();
List
<
String
>
personUnidList
=
new
ArrayList
<>();
Map
<
String
,
Float
>
personScoreMap
=
new
HashMap
<>();
List
<
Person
>
matchBodies
=
result
.
getMatchBodies
();
List
<
Person
>
matchBodies
=
result
.
getMatchBodies
();
List
<
String
>
personUnidList
=
matchBodies
.
stream
().
filter
(
x
->
x
.
getScore
()
>
60
F
).
map
(
Person:
:
getPersonId
).
filter
(
x
->
!
personUnidSet
.
contains
(
x
)).
collect
(
Collectors
.
toList
());
for
(
Person
match
:
matchBodies
)
{
String
personId
=
match
.
getPersonId
();
if
(
match
.
getScore
()
<
60
F
||
personUnidSet
.
contains
(
personId
))
{
continue
;
}
personScoreMap
.
put
(
personId
,
match
.
getScore
());
personUnidList
.
add
(
personId
);
}
if
(
personUnidList
.
size
()
==
0
)
{
if
(
personUnidList
.
size
()
==
0
)
{
return
Collections
.
emptyMap
();
return
Collections
.
emptyMap
();
}
}
...
@@ -471,11 +482,26 @@ public class ReidService {
...
@@ -471,11 +482,26 @@ public class ReidService {
final
Set
<
String
>
matchFilter
=
currentPerson
==
null
?
Collections
.
emptySet
()
:
getMatchFilter
(
currentPerson
,
packId
);
final
Set
<
String
>
matchFilter
=
currentPerson
==
null
?
Collections
.
emptySet
()
:
getMatchFilter
(
currentPerson
,
packId
);
Map
<
String
,
List
<
SubTask
>>
collect
=
subTasks
.
stream
().
collect
(
Collectors
.
groupingBy
(
SubTask:
:
getPersonUnid
,
Collectors
.
toList
()));
Map
<
String
,
List
<
SubTask
>>
collect
=
subTasks
.
stream
().
sorted
(
(
o1
,
o2
)
->
{
String
o1P
=
o1
.
getPersonUnid
();
String
o2P
=
o2
.
getPersonUnid
();
Float
o1s
=
personScoreMap
.
get
(
o1P
);
Float
o2s
=
personScoreMap
.
get
(
o2P
);
if
(
o2s
==
null
)
{
return
1
;
}
else
if
(
o1s
!=
null
)
{
return
o1s
>
o2s
?
1
:
o1s
.
equals
(
o2s
)
?
0
:
-
1
;
}
else
{
return
-
1
;
}
}
).
collect
(
Collectors
.
groupingBy
(
SubTask:
:
getPersonUnid
,
LinkedHashMap:
:
new
,
Collectors
.
toList
()));
HashMap
<
String
,
Map
<
String
,
List
<
SubTask
>>>
ret
=
new
HashMap
<>();
HashMap
<
String
,
Map
<
String
,
List
<
SubTask
>>>
ret
=
new
HashMap
<>();
Map
<
String
,
List
<
SubTask
>>
hideMap
=
new
HashMap
<>();
Map
<
String
,
List
<
SubTask
>>
hideMap
=
new
Linked
HashMap
<>();
Map
<
String
,
List
<
SubTask
>>
displayMap
=
new
HashMap
<>();
Map
<
String
,
List
<
SubTask
>>
displayMap
=
new
Linked
HashMap
<>();
ret
.
put
(
"hide"
,
hideMap
);
ret
.
put
(
"hide"
,
hideMap
);
ret
.
put
(
"display"
,
displayMap
);
ret
.
put
(
"display"
,
displayMap
);
...
...
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