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 7c529878
authored
Sep 09, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<fix> reid 中对 subtask 的操作加上 packId 条件
1 parent
a5067a9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 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 @
7c52987
...
...
@@ -162,7 +162,7 @@ public class ReidService {
// 更新personUnid
SubTaskExample
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
needMergePersonUnidList
);
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
needMergePersonUnidList
)
.
andPackIdEqualTo
(
packId
)
;
SubTask
subTask
=
new
SubTask
();
subTask
.
setPersonUnid
(
newPersonUnid
);
if
(!
Objects
.
equals
(
newPersonUnid
,
currentPerson
))
{
...
...
@@ -236,7 +236,7 @@ public class ReidService {
future
.
get
();
// 更新被合并的人对应的person
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
new
ArrayList
<>(
originalPersonUnidSet
));
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
new
ArrayList
<>(
originalPersonUnidSet
))
.
andPackIdEqualTo
(
packId
)
;
subTasks
=
subTaskService
.
selectByExample
(
subTaskExample
);
Map
<
String
,
List
<
SubTask
>>
subTaskMap
=
subTasks
.
stream
().
collect
(
Collectors
.
groupingBy
(
SubTask:
:
getPersonUnid
,
Collectors
.
toList
()));
Set
<
String
>
keySet
=
subTaskMap
.
keySet
();
...
...
@@ -302,7 +302,7 @@ public class ReidService {
}
// 更新pic对应的原来的person
for
(
String
originalPersonUnid
:
originalPersonUnidSet
)
{
updatePoolByPersonUnid
(
originalPersonUnid
,
poolName
);
updatePoolByPersonUnid
(
originalPersonUnid
,
p
ackId
,
p
oolName
);
}
// 移除缓存
for
(
Long
picId
:
picIdSet
)
{
...
...
@@ -382,7 +382,7 @@ public class ReidService {
*/
public
void
finishLabeling
(
String
personUnid
,
Long
packId
)
{
SubTaskExample
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
);
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
)
.
andPackIdEqualTo
(
packId
)
;
List
<
SubTask
>
subTasks
=
subTaskService
.
selectByExample
(
subTaskExample
);
if
(
subTasks
.
size
()
==
0
)
{
...
...
@@ -465,7 +465,7 @@ public class ReidService {
}
SubTaskExample
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
personUnidList
);
subTaskExample
.
createCriteria
().
andPersonUnidIn
(
personUnidList
)
.
andPackIdEqualTo
(
packId
)
;
subTasks
=
subTaskService
.
selectByExample
(
subTaskExample
);
final
Set
<
String
>
matchFilter
=
currentPerson
==
null
?
Collections
.
emptySet
()
:
getMatchFilter
(
currentPerson
,
packId
);
...
...
@@ -521,7 +521,7 @@ public class ReidService {
try
{
for
(
String
item
:
personUnidSet
)
{
updatePoolByPersonUnid
(
item
,
reidPoolName
);
updatePoolByPersonUnid
(
item
,
packId
,
reidPoolName
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
""
,
e
);
...
...
@@ -554,7 +554,7 @@ public class ReidService {
subTask
.
setAnnotatorId
(
StpUtil
.
getLoginIdAsLong
());
SubTaskExample
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
);
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
)
.
andPackIdEqualTo
(
packId
)
;
List
<
SubTask
>
subTasks
=
subTaskService
.
selectByExample
(
subTaskExample
);
...
...
@@ -608,7 +608,7 @@ public class ReidService {
Set
<
String
>
personUnidNeedUpdate
=
subTasks
.
stream
().
map
(
SubTask:
:
getPersonUnid
).
collect
(
Collectors
.
toSet
());
subTaskService
.
updateByExampleSelective
(
subTask
,
subTaskExample
);
for
(
String
s
:
personUnidNeedUpdate
)
{
updatePoolByPersonUnid
(
s
,
poolName
);
updatePoolByPersonUnid
(
s
,
p
ackId
,
p
oolName
);
}
}
}
...
...
@@ -658,12 +658,12 @@ public class ReidService {
return
Collections
.
singletonList
(
bodyFeature
);
}
private
void
updatePoolByPersonUnid
(
String
personUnid
,
String
poolName
)
throws
Exception
{
private
void
updatePoolByPersonUnid
(
String
personUnid
,
Long
packId
,
String
poolName
)
throws
Exception
{
if
(
personUnid
==
null
||
poolName
==
null
)
{
return
;
}
SubTaskExample
subTaskExample
=
new
SubTaskExample
();
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
);
subTaskExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
)
.
andPackIdEqualTo
(
packId
)
;
List
<
SubTask
>
subTasks
=
subTaskService
.
selectByExample
(
subTaskExample
);
if
(
subTasks
.
size
()
>
0
)
{
...
...
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