@@ -33,35 +33,6 @@ public interface PicMapper extends BaseMapper {
intupdateByPrimaryKey(Picrecord);
@Insert("insert into d_sub_task(create_user,pic_id,task_id,in_inspector_id) select #{createUserId},id,#{taskId},#{inInspectorId} from d_pic where pack_id=#{packId}")
@Insert("insert into d_sub_task(create_user,pic_id,task_id,in_inspector_id,pack_id) select #{createUserId},id,#{taskId},#{inInspectorId},#{packId} from d_pic where pack_id=#{packId}")
@Update("update d_pic set person_unid = #{personUnid},status=(select status from d_pic where person_unid = #{personUnid} limit 1) where id = #{id}")
voidmergeTo(Longid,StringpersonUnid);
@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>) "+
"(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 "+
"</script>")
intcountPeople(LongpackId,Integerstatus);
@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"+
@@ -39,4 +41,41 @@ public interface SubTaskMapper extends BaseMapper {
@Update("update d_sub_task set out_inspector_id = #{outInspectorId},annotator_id = #{annotatorId} where id in (select id from d_sub_task where task_id= #{taskId} and out_inspector_id is null and annotator_id is null order by id OFFSET 0 limit #{count} )")
"select id,unid,create_time as createTime,pack_id as packId,pic_id as picId,task_id as taskId,person_unid as personUnid,status from d_sub_task where pack_id=#{packId} and person_unid in "+
"(select person_unid from d_sub_task 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>) "+
"(select person_unid from d_sub_task where pack_id=#{packId}"+
" <if test = 'status != null'> and status=#{status}</if> group by person_unid "+
// " having count(*) > 1 " +
") as t "+
"</script>")
intcountPeople(LongpackId,Integerstatus);
@Select("<script>"+
"select id,unid,create_time as createTime,pack_id as packId,pic_id as picId,task_id as taskId,person_unid as personUnid,status from d_sub_task where pack_id=#{packId} and person_unid="+
"(select person_unid from d_sub_task 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"+