Commit fb3ce759 by 朱海

[add]增加按文件夹id搜索

1 parent 08223f55
......@@ -86,10 +86,11 @@ public class ReidController {
@RequestParam(required = false) Long annotatorId, @RequestParam(defaultValue = "1") Integer countGTE,
@RequestParam(defaultValue = "1000000") Integer countLTE,
@RequestParam(required = false) Date startTime,
@RequestParam(required = false) Date endTime) {
@RequestParam(required = false) Date endTime,
@RequestParam(required = false) String personId) {
SubTaskMapper mapper = (SubTaskMapper) subTaskService.getMapper();
List<String> personUnids = mapper.getPersonUnids(packId, status, page == null ? null : (page - 1) * size, size, annotatorId, countGTE, countLTE, startTime, endTime);
List<String> personUnids = mapper.getPersonUnids(packId, status, page == null ? null : (page - 1) * size, size, annotatorId, countGTE, countLTE, startTime, endTime, personId);
List<SubTaskVo> people = CollUtil.isEmpty(personUnids) ? Collections.emptyList() : mapper.getPeople(packId, personUnids);
Map<String, User> labelingMap = reidService.getRedissonClient().<String, User>getMap("labeling:" + packId).readAllMap();
......@@ -110,7 +111,7 @@ public class ReidController {
if (page != null) {
PageInfo<Map<String, List<SubTaskVo>>> pageInfo = new PageInfo<>(result, page.intValue());
pageInfo.setTotal(mapper.countPeople(packId, status, annotatorId, countGTE, countLTE,startTime, endTime));
pageInfo.setTotal(mapper.countPeople(packId, status, annotatorId, countGTE, countLTE,startTime, endTime, personId));
return JsonMessageUtil.getSuccessJsonMsg(pageInfo);
} else {
return JsonMessageUtil.getSuccessJsonMsg(result);
......
......@@ -72,13 +72,14 @@ public interface SubTaskMapper extends BaseMapper {
" <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> " +
"<if test = 'personId != null'> and person_unid = #{personId}</if>" +
"<if test = 'startTime != null &amp;&amp; endTime != null'> and annotate_time between #{startTime} and #{endTime}</if>" +
"group by person_unid " +
" having count(*) between #{countGTE} and #{countLTE} " +
" order by max(annotate_time) desc nulls last, person_unid desc " +
"<if test='offset != null'> offset #{offset} limit #{limit}</if>" +
"</script>")
List<String> getPersonUnids(Long packId, Integer status, Long offset, Long limit, Long annotatorId, Integer countGTE, Integer countLTE, Date startTime, Date endTime);
List<String> getPersonUnids(Long packId, Integer status, Long offset, Long limit, Long annotatorId, Integer countGTE, Integer countLTE, Date startTime, Date endTime, String personId);
@Select("<script>" +
"select count(*) from " +
......@@ -86,12 +87,13 @@ public interface SubTaskMapper extends BaseMapper {
" <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> " +
"<if test = 'personId != null'> and person_unid = #{personId}</if>" +
"<if test = 'startTime != null &amp;&amp; endTime != null'> and annotate_time between #{startTime} and #{endTime}</if>" +
" group by person_unid " +
" having count(*) between #{countGTE} and #{countLTE} " +
") as t " +
"</script>")
int countPeople(Long packId, Integer status, Long annotatorId, Integer countGTE, Integer countLTE, Date startTime, Date endTime);
int countPeople(Long packId, Integer status, Long annotatorId, Integer countGTE, Integer countLTE, Date startTime, Date endTime, String personId);
@Select("<script>" +
"select d_sub_task.id,d_sub_task.unid,d_sub_task.create_time as createTime,pack_id as packId," +
......
package com.viontech.label.platform.model;
import com.viontech.label.platform.base.BaseModel;
import com.viontech.label.platform.vo.SubTaskVo;
import java.util.Date;
import java.util.Map;
......@@ -49,6 +51,8 @@ public class SubTask extends BaseModel {
private String personFlag;
private String labelUserName;
public Long getId() {
return id;
}
......@@ -224,4 +228,13 @@ public class SubTask extends BaseModel {
public void setPersonFlag(String personFlag) {
this.personFlag = personFlag;
}
public String getLabelUserName() {
return labelUserName;
}
public SubTask setLabelUserName(String labelUserName) {
this.labelUserName = labelUserName;
return this;
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!