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 cca6ea2d
authored
Jul 15, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
59619fb9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 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 @
cca6ea2
...
@@ -139,14 +139,16 @@ public class ReidService {
...
@@ -139,14 +139,16 @@ public class ReidService {
}
}
String
poolName
=
Constants
.
getReidPoolName
(
packId
);
String
poolName
=
Constants
.
getReidPoolName
(
packId
);
List
<
String
>
personUnidNeedDeleteAndUpdate
=
needMergePersonUnidList
.
s
ubList
(
0
,
1
);
List
<
String
>
personUnidNeedDeleteAndUpdate
=
needMergePersonUnidList
.
s
tream
().
filter
(
x
->
!
x
.
equals
(
newPersonUnid
)).
collect
(
Collectors
.
toList
()
);
// 更新personUnid
// 更新personUnid
PicExample
picExample
=
new
PicExample
();
PicExample
picExample
=
new
PicExample
();
picExample
.
createCriteria
().
andPersonUnidIn
(
needMergePersonUnidList
);
picExample
.
createCriteria
().
andPersonUnidIn
(
needMergePersonUnidList
);
Pic
pic
=
new
Pic
();
Pic
pic
=
new
Pic
();
pic
.
setPersonUnid
(
newPersonUnid
);
pic
.
setPersonUnid
(
newPersonUnid
);
if
(!
Objects
.
equals
(
newPersonUnid
,
currentPerson
))
{
pic
.
setStatus
(
PicStatus
.
TO_BE_LABELED
.
val
);
pic
.
setStatus
(
PicStatus
.
TO_BE_LABELED
.
val
);
}
picService
.
updateByExampleSelective
(
pic
,
picExample
);
picService
.
updateByExampleSelective
(
pic
,
picExample
);
// 删除和更新特征池
// 删除和更新特征池
CompletableFuture
<
AlgResult
>
future
=
matchClient
.
EASY_PERSON_API
.
deletePerson
(
poolName
,
personUnidNeedDeleteAndUpdate
);
CompletableFuture
<
AlgResult
>
future
=
matchClient
.
EASY_PERSON_API
.
deletePerson
(
poolName
,
personUnidNeedDeleteAndUpdate
);
...
@@ -208,6 +210,7 @@ public class ReidService {
...
@@ -208,6 +210,7 @@ public class ReidService {
pics
=
picService
.
selectByExample
(
picExample
);
pics
=
picService
.
selectByExample
(
picExample
);
Map
<
String
,
List
<
Pic
>>
picMap
=
pics
.
stream
().
collect
(
Collectors
.
groupingBy
(
Pic:
:
getPersonUnid
,
Collectors
.
toList
()));
Map
<
String
,
List
<
Pic
>>
picMap
=
pics
.
stream
().
collect
(
Collectors
.
groupingBy
(
Pic:
:
getPersonUnid
,
Collectors
.
toList
()));
Set
<
String
>
keySet
=
picMap
.
keySet
();
Set
<
String
>
keySet
=
picMap
.
keySet
();
//如果keySet中没有原来的personUnid了,说明某个人的照片全部被合并走了需要从特征池中删掉
for
(
String
personUnid
:
originalPersonUnidSet
)
{
for
(
String
personUnid
:
originalPersonUnidSet
)
{
if
(!
keySet
.
contains
(
personUnid
))
{
if
(!
keySet
.
contains
(
personUnid
))
{
future
=
matchClient
.
EASY_PERSON_API
.
deletePerson
(
poolName
,
Collections
.
singletonList
(
personUnid
));
future
=
matchClient
.
EASY_PERSON_API
.
deletePerson
(
poolName
,
Collections
.
singletonList
(
personUnid
));
...
...
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