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 b9c4236e
authored
Jan 19, 2022
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
检索人员时先查出personUnid再查询具体列表不然有些情况下不会走索引
1 parent
330053d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
label-platform/src/main/java/com/viontech/label/platform/controller/web/ReidController.java
label-platform/src/main/java/com/viontech/label/platform/mapper/SubTaskMapper.java
label-tool-keliu/src/main/java/com/viontech/label/tool/keliu/controller/KeliuController.java
label-platform/src/main/java/com/viontech/label/platform/controller/web/ReidController.java
View file @
b9c4236
...
...
@@ -66,7 +66,8 @@ public class ReidController {
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
countGTE
,
@RequestParam
(
defaultValue
=
"1000000"
)
Integer
countLTE
)
{
SubTaskMapper
mapper
=
(
SubTaskMapper
)
subTaskService
.
getMapper
();
List
<
SubTaskVo
>
people
=
mapper
.
getPeople
(
packId
,
status
,
page
==
null
?
null
:
(
page
-
1
)
*
size
,
size
,
annotatorId
,
countGTE
,
countLTE
);
List
<
String
>
personUnids
=
mapper
.
getPersonUnids
(
packId
,
status
,
page
==
null
?
null
:
(
page
-
1
)
*
size
,
size
,
annotatorId
,
countGTE
,
countLTE
);
List
<
SubTaskVo
>
people
=
mapper
.
getPeople
(
packId
,
personUnids
);
LinkedHashMap
<
String
,
List
<
SubTaskVo
>>
temp
=
new
LinkedHashMap
<>();
Map
<
String
,
User
>
labelingMap
=
reidService
.
getRedissonClient
().<
String
,
User
>
getMap
(
"labeling:"
+
packId
).
readAllMap
();
...
...
label-platform/src/main/java/com/viontech/label/platform/mapper/SubTaskMapper.java
View file @
b9c4236
...
...
@@ -61,17 +61,22 @@ public interface SubTaskMapper extends BaseMapper {
"select d_sub_task.id,d_sub_task.unid,d_sub_task.create_time as createTime,pack_id as packId,"
+
"pic_id as picId,task_id as taskId,person_unid as personUnid,d_sub_task.status,s_user.name as labelUserName "
+
"from d_sub_task left join s_user on annotator_id=s_user.id where pack_id=#{packId} and person_unid in "
+
"(select person_unid from d_sub_task where pack_id=#{packId}"
+
" <foreach item='item' collection='personUnids' open='(' separator=',' close=')'> #{item} </foreach>"
+
" order by person_unid "
+
"</script>"
)
List
<
SubTaskVo
>
getPeople
(
Long
packId
,
List
<
String
>
personUnids
);
@Select
(
"<script>"
+
"select person_unid from d_sub_task where pack_id=#{packId}"
+
" <if test = 'status != null'> and status=#{status}</if> "
+
" <if test = 'status == null'> and status != -1</if> "
+
" <if test = 'annotatorId != null'> and annotator_id = #{annotatorId}</if> "
+
"group by person_unid "
+
" having count(*) between #{countGTE} and #{countLTE} "
+
" order by person_unid "
+
"<if test='offset != null'> offset #{offset} limit #{limit}</if>) "
+
" order by person_unid "
+
"<if test='offset != null'> offset #{offset} limit #{limit}</if>"
+
"</script>"
)
List
<
S
ubTaskVo
>
getPeople
(
Long
packId
,
Integer
status
,
Long
offset
,
Long
limit
,
Long
annotatorId
,
Integer
countGTE
,
Integer
countLTE
);
List
<
S
tring
>
getPersonUnids
(
Long
packId
,
Integer
status
,
Long
offset
,
Long
limit
,
Long
annotatorId
,
Integer
countGTE
,
Integer
countLTE
);
@Select
(
"<script>"
+
"select count(*) from "
+
...
...
label-tool-keliu/src/main/java/com/viontech/label/tool/keliu/controller/KeliuController.java
View file @
b9c4236
...
...
@@ -56,7 +56,7 @@ public class KeliuController {
@GetMapping
(
"/sendData"
)
public
Object
sendData
(
@RequestParam
Date
date
,
@RequestParam
Long
mallId
,
@RequestParam
Long
packId
,
@RequestParam
Long
taskId
)
{
public
Object
sendData
(
@RequestParam
Date
date
,
@RequestParam
Long
mallId
,
@RequestParam
Long
packId
,
@RequestParam
(
required
=
false
)
Long
taskId
)
{
List
<
Future
<
JsonMessageUtil
.
JsonMessage
>>
responses
=
new
LinkedList
<>();
if
(
SEND_DATA
)
{
return
JsonMessageUtil
.
getErrorJsonMsg
(
"有数据传输任务正在进行"
);
...
...
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