Commit eb8f558a by xmh

完成状态变更,reid单张图片过滤关闭

1 parent 9deca17a
......@@ -42,20 +42,26 @@ public interface PicMapper extends BaseMapper {
@Select("<script>" +
"select id,unid,create_time as createTime,name,storage_id as storageId,pack_id as packId,person_unid as personUnid,status from d_pic where pack_id=#{packId} and person_unid in " +
"(select person_unid from d_pic where pack_id=#{packId}" +
" <if test = 'status != null'> and status=#{status}</if> group by person_unid having count(*) > 1 order by person_unid <if test='offset != null'> offset #{offset} limit #{limit}</if>) " +
" <if test = 'status != null'> and status=#{status}</if> group by person_unid " +
// " having count(*) > 1 " +
" order by person_unid <if test='offset != null'> offset #{offset} limit #{limit}</if>) " +
" order by person_unid </script>")
List<Pic> getPeople(Long packId, Integer status, Long offset, Long limit);
@Select("<script>" +
"select count(*) from " +
"(select person_unid from d_pic where pack_id=#{packId}" +
" <if test = 'status != null'> and status=#{status}</if> group by person_unid having count(*) > 1) as t " +
" <if test = 'status != null'> and status=#{status}</if> group by person_unid " +
// " having count(*) > 1 " +
") as t " +
"</script>")
int countPeople(Long packId, Integer status);
@Select("<script>" +
"select id,unid,create_time as createTime,name,storage_id as storageId,pack_id as packId,person_unid as personUnid,status from d_pic where pack_id=#{packId} and person_unid=" +
"(select person_unid from d_pic where pack_id=#{packId} <if test = 'status != null'> and status=#{status}</if> and person_unid ${type} #{personUnid} group by person_unid having count(*) > 1 order by person_unid ${sort} limit 1) order by id" +
"(select person_unid from d_pic where pack_id=#{packId} <if test = 'status != null'> and status=#{status}</if> and person_unid ${type} #{personUnid} group by person_unid " +
// " having count(*) > 1 " +
" order by person_unid ${sort} limit 1) order by id" +
"</script>")
List<Pic> getOtherPeople(Long packId, Integer status, String personUnid, String type,String sort);
List<Pic> getOtherPeople(Long packId, Integer status, String personUnid, String type, String sort);
}
\ No newline at end of file
......@@ -287,6 +287,13 @@ public class ReidService {
public void setPackPure(String personUnid, Long packId) {
PicExample picExample = new PicExample();
picExample.createCriteria().andPersonUnidEqualTo(personUnid);
List<Pic> pics = picService.selectByExample(picExample);
if (pics.size() > 0 && pics.get(0).getStatus().equals(PicStatus.FINISH_LABELING.val)) {
throw new RuntimeException("已经是完成状态了!");
}
Pic pic = new Pic();
pic.setStatus(PicStatus.FINISH_LABELING.val);
picService.updateByExampleSelective(pic, picExample);
......@@ -420,6 +427,15 @@ public class ReidService {
pic.setStatus(PicStatus.LABELING.val);
PicExample picExample = new PicExample();
picExample.createCriteria().andPersonUnidEqualTo(personUnid);
List<Pic> pics = picService.selectByExample(picExample);
if (pics.size() > 0 && pics.get(0).getStatus().equals(PicStatus.FINISH_LABELING.val)) {
return true;
}
if (pics.size() == 0) {
return true;
}
picService.updateByExampleSelective(pic, picExample);
// redis 进行记录
......
server.port=12100
# database
spring.datasource.url=jdbc:postgresql://36.112.68.214:5432/vion_label
spring.datasource.username=postgres
spring.datasource.password=vion
#spring.datasource.url=jdbc:postgresql://36.112.68.214:5432/vion_label
#spring.datasource.username=postgres
#spring.datasource.password=vion
spring.datasource.url=jdbc:postgresql://pgm-2ze197c18ro6p1r1fo.pg.rds.aliyuncs.com:3433/vion-label
spring.datasource.username=vion
spring.datasource.password=cdmqYwBq9uAdvLJb
# redis
spring.redis.host=36.112.68.214
spring.redis.host=47.94.47.137
spring.redis.port=6379
spring.redis.password=vionredis
spring.redis.database=0
......@@ -12,4 +15,6 @@ spring.redis.database=0
logging.level.com.viontech.label.platform.mapper=error
debug=false
# vion
vion.match-url=http://36.112.68.214:12000/alg
\ No newline at end of file
#vion.match-url=http://36.112.68.214:12000/alg
#vion.match-url=http://101.201.36.180:12001/alg
vion.match-url=http://127.0.0.1:12000/alg
\ No newline at end of file
......@@ -2,7 +2,7 @@ server:
port: 12100
spring:
profiles:
active: dev
active: pro
sa-token:
token-name: token
activity-timeout: 36000
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!