|
|
|
@ -158,6 +158,187 @@
|
|
|
|
|
</trim>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Where_union_new">
|
|
|
|
|
<where>
|
|
|
|
|
<trim prefixOverrides="and|or">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ocpictureid != null">
|
|
|
|
|
|
|
|
|
|
and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pictureresult != null">
|
|
|
|
|
and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="picturecompare != null">
|
|
|
|
|
and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deptid != null">
|
|
|
|
|
and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tenantid != null">
|
|
|
|
|
and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="packageid != null">
|
|
|
|
|
and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pictureid != null">
|
|
|
|
|
and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="category != null">
|
|
|
|
|
and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="categoryid != null">
|
|
|
|
|
and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="specification != null">
|
|
|
|
|
and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buessinessno != null">
|
|
|
|
|
and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="states != null"> and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend}</if>-->
|
|
|
|
|
<if test="processinstanceid != null">
|
|
|
|
|
and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="processdefinitionid != null">
|
|
|
|
|
and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deploymentid != null">
|
|
|
|
|
and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assigneename != null">
|
|
|
|
|
and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assignee != null">
|
|
|
|
|
and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateuser != null">
|
|
|
|
|
and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatetime != null">
|
|
|
|
|
and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fileannex != null">
|
|
|
|
|
and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="guidang != null">
|
|
|
|
|
and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createuser != null">
|
|
|
|
|
and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createusername != null">
|
|
|
|
|
and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdate != null">
|
|
|
|
|
and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdateStart != null">
|
|
|
|
|
and tcp.CREATEDATE ${createdateStart.dataOp} ${createdateStart.likestar}#{createdateStart.value}${createdateStart.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdateEnd != null">
|
|
|
|
|
and tcp.CREATEDATE ${createdateEnd.dataOp} ${createdateEnd.likestar}#{createdateEnd.value}${createdateEnd.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="username != null">
|
|
|
|
|
and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromtaskid != null">
|
|
|
|
|
and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromtaskname != null">
|
|
|
|
|
and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="fromuserid != null"> and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend}</if>-->
|
|
|
|
|
<!-- <if test="fromprojectid != null"> and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend}</if>-->
|
|
|
|
|
<!-- <if test="fromplanid != null"> and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend}</if>-->
|
|
|
|
|
<if test="fromuptime != null">
|
|
|
|
|
and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromuserid != null">
|
|
|
|
|
and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}
|
|
|
|
|
<!-- #{fromuserid.value}-->
|
|
|
|
|
<if test="fromuserid.value instanceof java.util.List">
|
|
|
|
|
<foreach item="item" collection="fromuserid.value" open="" separator="," close="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="!fromuserid.value instanceof java.util.List">
|
|
|
|
|
#{fromuserid.value}
|
|
|
|
|
</if>
|
|
|
|
|
${fromuserid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromprojectid != null">
|
|
|
|
|
and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}
|
|
|
|
|
<!-- #{fromuserid.value}-->
|
|
|
|
|
<if test="fromprojectid.value instanceof java.util.List">
|
|
|
|
|
<foreach item="item" collection="fromprojectid.value" open="" separator="," close="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="!fromprojectid.value instanceof java.util.List">
|
|
|
|
|
#{fromprojectid.value}
|
|
|
|
|
</if>
|
|
|
|
|
${fromprojectid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromplanid != null">
|
|
|
|
|
and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}
|
|
|
|
|
<!-- #{fromuserid.value}-->
|
|
|
|
|
<if test="fromplanid.value instanceof java.util.List">
|
|
|
|
|
<foreach item="item" collection="fromplanid.value" open="" separator="," close="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="!fromplanid.value instanceof java.util.List">
|
|
|
|
|
#{fromplanid.value}
|
|
|
|
|
</if>
|
|
|
|
|
${fromplanid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="states != null">
|
|
|
|
|
and tcp.STATES ${states.dataOp} ${states.likestar}
|
|
|
|
|
<!-- #{fromuserid.value}-->
|
|
|
|
|
<if test="states.value instanceof java.util.List">
|
|
|
|
|
<foreach item="item" collection="states.value" open="" separator="," close="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="!states.value instanceof java.util.List">
|
|
|
|
|
#{states.value}
|
|
|
|
|
</if>
|
|
|
|
|
${states.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromsourceid != null">
|
|
|
|
|
and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}
|
|
|
|
|
<!-- #{fromuserid.value}-->
|
|
|
|
|
<if test="fromsourceid.value instanceof java.util.List">
|
|
|
|
|
<foreach item="item" collection="fromsourceid.value" open="" separator="," close="">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="!fromsourceid.value instanceof java.util.List">
|
|
|
|
|
#{fromsourceid.value}
|
|
|
|
|
</if>
|
|
|
|
|
${fromsourceid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="fromuserid.value instanceof java.util.List"> and tcp.FROMUSERID-->
|
|
|
|
|
<!-- in-->
|
|
|
|
|
<!-- <foreach item="item" collection="fromuserid.value" open="(" separator="," close=")">-->
|
|
|
|
|
<!-- #{item}-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="havepoints != null">
|
|
|
|
|
and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taskname != null">
|
|
|
|
|
and tcp.TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userid != null">
|
|
|
|
|
and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectUserByFromid" resultMap="BaseResultUserMap" >
|
|
|
|
|
select
|
|
|
|
|
u.ID AS id,
|
|
|
|
@ -232,6 +413,55 @@
|
|
|
|
|
where t2.TENANTID = #{tenantId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="repetitionTaskNew" resultMap="resultMap">
|
|
|
|
|
SELECT t1.count,
|
|
|
|
|
t1.content,
|
|
|
|
|
t1.id,
|
|
|
|
|
t1.imgUrl,
|
|
|
|
|
pic.similarity_score similarityScore,
|
|
|
|
|
tcp.STATES,
|
|
|
|
|
pic.remark as fromTaskId,
|
|
|
|
|
pic.taskName,
|
|
|
|
|
tcp.TASKNAME nodeName,
|
|
|
|
|
tcp.FROMUPTIME fromTime,
|
|
|
|
|
tcp.UPDATETIME as updateTime,
|
|
|
|
|
tcp.TASKID as taskId,
|
|
|
|
|
tcp.ID as formId,
|
|
|
|
|
t1.pictureIds
|
|
|
|
|
from (select count(field8) count, field8 content, ID id, GROUP_CONCAT(id) pictureIds, imgUrl
|
|
|
|
|
FROM ocr_picture
|
|
|
|
|
where suspiciousfile = 0
|
|
|
|
|
and tenant_id = #{tenantid.value,jdbcType=VARCHAR}
|
|
|
|
|
GROUP BY field8
|
|
|
|
|
HAVING count(field8) > 1) t1
|
|
|
|
|
left JOIN ocr_picture pic on t1.content = pic.field8
|
|
|
|
|
left JOIN ocr_taskchild_picture tcp ON pic.ID = tcp.PICTUREID
|
|
|
|
|
<include refid="Base_Where_union_new"/>
|
|
|
|
|
<if test="type.value == 0">
|
|
|
|
|
and tcp.ISFINAIL = 1
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="type.value == 1">
|
|
|
|
|
and tcp.ISLAST = 1
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thisLoginUserid != null and isFail == null">
|
|
|
|
|
and FIND_IN_SET(#{thisLoginUserid.value}
|
|
|
|
|
, tcp.ASSIGNEE)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thisLoginUserid != null and isFail != null">
|
|
|
|
|
and (FIND_IN_SET(#{thisLoginUserid.value}
|
|
|
|
|
, tcp.ASSIGNEE)
|
|
|
|
|
or tcp.STATES = 5)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="fromuptimeStart != null">
|
|
|
|
|
and tcp.fromuptime >= ${fromuptimeStart.value}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromuptimeEnd != null">
|
|
|
|
|
and tcp.fromuptime <= ${fromuptimeEnd.value}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="repetitionTaskList" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture">
|
|
|
|
|
SELECT t2.*, t3.similarity_score similarityScore
|
|
|
|
|
FROM ocr_taskchild_picture t2
|
|
|
|
|