You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocr/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml

1036 lines
53 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="OCPICTUREID" property="ocpictureid" jdbcType="LONGVARCHAR"/>
<result column="PICTURERESULT" property="pictureresult" jdbcType="LONGVARCHAR"/>
<result column="PICTURECOMPARE" property="picturecompare" jdbcType="LONGVARCHAR"/>
<result column="DEPTID" property="deptid" jdbcType="VARCHAR"/>
<result column="TENANTID" property="tenantid" jdbcType="BIGINT"/>
<result column="PACKAGEID" property="packageid" jdbcType="BIGINT"/>
<result column="PICTUREID" property="pictureid" jdbcType="BIGINT"/>
<result column="CATEGORY" property="category" jdbcType="VARCHAR"/>
<result column="CATEGORYID" property="categoryid" jdbcType="BIGINT"/>
<result column="SPECIFICATION" property="specification" jdbcType="VARCHAR"/>
<result column="BUESSINESSNO" property="buessinessno" jdbcType="VARCHAR"/>
<result column="STATES" property="states" jdbcType="INTEGER"/>
<result column="PROCESSINSTANCEID" property="processinstanceid" jdbcType="VARCHAR"/>
<result column="PROCESSDEFINITIONID" property="processdefinitionid" jdbcType="VARCHAR"/>
<result column="DEPLOYMENTID" property="deploymentid" jdbcType="VARCHAR"/>
<result column="ASSIGNEENAME" property="assigneename" jdbcType="VARCHAR"/>
<result column="ASSIGNEE" property="assignee" jdbcType="VARCHAR"/>
<result column="UPDATEUSER" property="updateuser" jdbcType="VARCHAR"/>
<result column="UPDATETIME" property="updatetime" jdbcType="BIGINT"/>
<result column="FILEANNEX" property="fileannex" jdbcType="VARCHAR"/>
<result column="GUIDANG" property="guidang" jdbcType="INTEGER"/>
<result column="CREATEUSER" property="createuser" jdbcType="VARCHAR"/>
<result column="CREATEUSERNAME" property="createusername" jdbcType="VARCHAR"/>
<result column="CREATEDATE" property="createdate" jdbcType="BIGINT"/>
<result column="USERID" property="userid" jdbcType="BIGINT"/>
<result column="USERNAME" property="username" jdbcType="VARCHAR"/>
<result column="FROMTASKID" property="fromtaskid" jdbcType="VARCHAR"/>
<result column="FROMTASKNAME" property="fromtaskname" jdbcType="VARCHAR"/>
<result column="FROMUSERID" property="fromuserid" jdbcType="VARCHAR"/>
<result column="FROMPROJECTID" property="fromprojectid" jdbcType="VARCHAR"/>
<result column="FROMPLANID" property="fromplanid" jdbcType="VARCHAR"/>
<result column="FROMUPTIME" property="fromuptime" jdbcType="BIGINT"/>
<result column="FROMSOURCEID" property="fromsourceid" jdbcType="VARCHAR"/>
<result column="HAVEPOINTS" property="havepoints" jdbcType="INTEGER"/>
<result column="TASKNAME" property="taskname" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="taskResultMap" type="cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo">
<result column="assigneeName" property="assigneeName"/>
<result column="createDate" property="createDate"/>
<result column="createUser" property="createUser"/>
<result column="createUserName" property="createUserName"/>
<result column="deploymentId" property="deploymentId"/>
<result column="fileAnnex" property="fileAnnex"/>
<result column="finishTime" property="finishTime"/>
<result column="fromPlanId" property="fromPlanId"/>
<result column="fromProjectId" property="fromProjectId"/>
<result column="fromProjectName" property="fromProjectName"/>
<result column="fromSourceId" property="fromSourceId"/>
<result column="fromTaskId" property="fromTaskId"/>
<result column="fromTaskName" property="fromTaskName"/>
<result column="fromUserId" property="fromUserId"/>
<result column="fromUserName" property="fromUserName"/>
<result column="fromupTime" property="fromupTime"/>
<result column="guiDang" property="guiDang"/>
<result column="havePoints" property="havePoints"/>
<result column="historyStates" property="historyStates"/>
<result column="imgUrl" property="imgUrl"/>
<result column="maxSimilarity" property="maxSimilarity"/>
<result column="photoDateTimestamp" property="photoDateTimestamp"/>
<result column="pictureId" property="pictureId"/>
<result column="processDefinitionId" property="processDefinitionId"/>
<result column="processInstanceId" property="processInstanceId"/>
<result column="serverThumbnailUrl" property="serverThumbnailUrl"/>
<result column="submitDateTimestamp" property="submitDateTimestamp"/>
<result column="taskId" property="taskId"/>
<result column="taskName" property="taskName"/>
<result column="userId" property="userId"/>
<result column="userName" property="userName"/>
<association property="pictureInfo" javaType="cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo">
<result column="picture_id" property="pictureId"/>
<result column="img_size" property="imgSize"/>
<result column="img_name" property="imgName"/>
<result column="img_format" property="imgFormat"/>
<result column="img_measure" property="imgMeasure"/>
<result column="upload_time" property="uploadTime"/>
<result column="create_time" property="createTime"/>
<result column="img_space" property="imgSpace"/>
<result column="tag_time" property="tagTime"/>
<result column="source" property="source"/>
</association>
</resultMap>
<resultMap id="PictureResultMap" type="cn.jyjz.xiaoyao.ocr.vo.PictureDetailVo">
<result column="picture_id" property="pictureId"/>
<result column="taskChildId" property="taskChildId"/>
<result column="taskname" property="taskName"/>
<result column="STATES" property="states"/>
<result column="similarity_score" property="similarityScore"/>
<result column="location" property="location"/>
<result column="work_status" property="workStatus"/>
<result column="finishtime" property="finishTime"/>
<result column="field1" property="field1"/>
<result column="field2" property="field2"/>
<result column="field3" property="field3"/>
<result column="field4" property="field4"/>
<result column="field5" property="field5"/>
<result column="field6" property="field6"/>
<result column="field7" property="field7"/>
<result column="field8" property="field8"/>
<result column="field9" property="field9"/>
<result column="field10" property="field10"/>
<result column="field11" property="field11"/>
<result column="field12" property="field12"/>
<result column="field13" property="field13"/>
<result column="field14" property="field14"/>
<result column="field15" property="field15"/>
<result column="field16" property="field16"/>
<result column="field17" property="field17"/>
<result column="imgUrl" property="imgUrl"/>
<association property="pictureInfo" javaType="cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo">
<id column="id" property="id"/>
<result column="picture_id" property="pictureId"/>
<result column="img_size" property="imgSize"/>
<result column="img_format" property="imgFormat"/>
<result column="img_measure" property="imgMeasure"/>
<result column="upload_time" property="uploadTime"/>
<result column="create_time" property="createTime"/>
<result column="img_space" property="imgSpace"/>
<result column="tag_time" property="tagTime"/>
<result column="source" property="source"/>
</association>
<collection property="userapproveList" ofType="cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove">
<id column="id" property="id"/>
<result column="userid" property="userid"/>
<result column="formid" property="formid"/>
<result column="taskname" property="taskname"/>
<result column="statshis" property="statshis"/>
<result column="commenthis" property="commenthis"/>
<result column="taskindex" property="taskindex"/>
<result column="taskno" property="taskno"/>
<result column="username" property="username"/>
<result column="createdate" property="createdate"/>
<result column="taskcomment" property="taskcomment"/>
</collection>
</resultMap>
<sql id="Base_Column_List">
ID AS id,
OCPICTUREID AS ocpictureid,
PICTURERESULT AS pictureresult,
PICTURECOMPARE AS picturecompare,
DEPTID AS deptid,
TENANTID AS tenantid,
PACKAGEID AS packageid,
PICTUREID AS pictureid,
CATEGORY AS category,
CATEGORYID AS categoryid,
SPECIFICATION AS specification,
BUESSINESSNO AS buessinessno,
STATES AS states,
PROCESSINSTANCEID AS processinstanceid,
PROCESSDEFINITIONID AS processdefinitionid,
DEPLOYMENTID AS deploymentid,
ASSIGNEENAME AS assigneename,
ASSIGNEE AS assignee,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime,
FILEANNEX AS fileannex,
GUIDANG AS guidang,
CREATEUSER AS createuser,
CREATEUSERNAME AS createusername,
CREATEDATE AS createdate,
USERID AS userid,
USERNAME AS username,
FROMTASKID AS fromtaskid,
FROMTASKNAME AS fromtaskname,
FROMUSERID AS fromuserid,
FROMPROJECTID AS fromprojectid,
FROMPLANID AS fromplanid,
FROMUPTIME AS fromuptime,
FROMSOURCEID AS fromsourceid,
HAVEPOINTS AS havepoints,
TASKNAME AS taskname
</sql>
<sql id="Base_Where">
<where>
<trim prefixOverrides="and|or">
<if test="id != null">
and ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}
</if>
<if test="ocpictureid != null">
and OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend}
</if>
<if test="pictureresult != null">
and PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend}
</if>
<if test="picturecompare != null">
and PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend}
</if>
<if test="deptid != null">
and DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend}
</if>
<if test="tenantid != null">
and TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend}
</if>
<if test="packageid != null">
and PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend}
</if>
<if test="pictureid != null">
and PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend}
</if>
<if test="category != null">
and CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend}
</if>
<if test="categoryid != null">
and CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend}
</if>
<if test="specification != null">
and SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend}
</if>
<if test="buessinessno != null">
and BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend}
</if>
<if test="states != null">
and STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend}
</if>
<if test="processinstanceid != null">
and PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend}
</if>
<if test="processdefinitionid != null">
and PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}
</if>
<if test="deploymentid != null">
and DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend}
</if>
<if test="assigneename != null">
and ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend}
</if>
<if test="assignee != null">
and ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend}
</if>
<if test="updateuser != null">
and UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend}
</if>
<if test="updatetime != null">
and UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend}
</if>
<if test="fileannex != null">
and FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend}
</if>
<if test="guidang != null">
and GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend}
</if>
<if test="createuser != null">
and CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}
</if>
<if test="createusername != null">
and CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend}
</if>
<if test="createdate != null">
and CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}
</if>
<if test="username != null">
and USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend}
</if>
<if test="fromtaskid != null">
and FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend}
</if>
<if test="fromtaskname != null">
and FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend}
</if>
<if test="fromuserid != null">
and FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend}
</if>
<if test="fromprojectid != null">
and FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend}
</if>
<if test="fromplanid != null">
and FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend}
</if>
<if test="fromuptime != null">
and FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend}
</if>
<if test="fromsourceid != null">
and FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend}
</if>
<if test="havepoints != null">
and HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend}
</if>
<if test="taskname != null">
and TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}
</if>
<if test="userid != null">
and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}
</if>
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null">
order by ${page.sortname} ${page.sortorder}
</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
<sql id="Base_Where_union">
<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>
<sql id="Base_Where_Union_New">
<where>
<trim prefixOverrides="and|or">
<if test="izupuser != null">
${izupuser.rulesOp} tcp.FROMUSERID ${izupuser.dataOp} ${izupuser.likestar}
<!-- #{fromuserid.value}-->
<if test="izupuser.value instanceof java.util.List">
<foreach item="item" collection="izupuser.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!izupuser.value instanceof java.util.List">
#{izupuser.value}
</if>
${izupuser.likeend}
</if>
<if test="iztaskrrom != null">
${iztaskrrom.rulesOp} tcp.FROMSOURCEID ${iztaskrrom.dataOp} ${iztaskrrom.likestar}
<!-- #{fromuserid.value}-->
<if test="iztaskrrom.value instanceof java.util.List">
<foreach item="item" collection="iztaskrrom.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!iztaskrrom.value instanceof java.util.List">
#{iztaskrrom.value}
</if>
${iztaskrrom.likeend}
</if>
<if test="izproject != null">
${izproject.rulesOp} tcp.FROMPROJECTNAME ${izproject.dataOp} ${izproject.likestar}
<!-- #{fromuserid.value}-->
<if test="izproject.value instanceof java.util.List">
<foreach item="item" collection="izproject.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!izproject.value instanceof java.util.List">
#{izproject.value}
</if>
${izproject.likeend}
</if>
<!-- <if test="izuptime != null">-->
<!-- ${izuptime.rulesOp} tcp.FROMUPTIME ${izuptime.dataOp} ${izuptime.likestar}#{izuptime.value}${izuptime.likeend}-->
<!-- </if>-->
<!-- <if test="izuptimeStart != null">-->
<!-- and tcp.FROMUPTIME &gt;= '${izuptimeStart.value}'-->
<!-- </if>-->
<!-- <if test="izuptimeEnd != null">-->
<!-- and tcp.FROMUPTIME &lt;= '${izuptimeEnd.value}'-->
<!-- </if>-->
<if test="izuptimeStart != null">
<!-- 如果 izuptimeStart.dataOp 的值为 "<",则使用 "or" 连接 -->
<choose>
<when test="izuptimeStart.rulesOp == 'or' || izuptimeEnd.rulesOp == 'or'">
<if test="izuptimeEnd != null">
and (tcp.FROMUPTIME ${izuptimeStart.dataOp} '${izuptimeStart.value}'
or tcp.FROMUPTIME ${izuptimeEnd.dataOp} '${izuptimeEnd.value}')
</if>
</when>
<otherwise>
<!-- 其他情况下仍然拼接 "and" 连接 -->
and tcp.FROMUPTIME ${izuptimeStart.dataOp} '${izuptimeStart.value}'
<if test="izuptimeEnd != null">
and tcp.FROMUPTIME ${izuptimeEnd.dataOp} '${izuptimeEnd.value}'
</if>
</otherwise>
</choose>
</if>
</trim>
</where>
</sql>
<select id="listFinal" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture"
parameterType="java.util.Map">
select tcp.*, pic.field11 reporttime, pic.similarity_score similarityscore from (
select tc.*
from ocr_taskchild_picture tc,
OA_USERFINAL_T uf
where tc.ID = uf.FORMID
<if test="thisLoginUserid != null">
and uf.USERID ${thisLoginUserid.dataOp} ${thisLoginUserid.likestar}#{thisLoginUserid.value}${thisLoginUserid.likeend}
</if>
UNION
select
tc.*
from ocr_taskchild_picture tc
where tc.STATES = 5
) as tcp
left join ocr_picture pic
on tcp.PICTUREID = pic.ID
<include refid="Base_Where_union">
</include>
and pic.suspiciousfile = 0
<if test="fromuptimeStart != null">
and tcp.fromuptime &gt;= ${fromuptimeStart.value}
</if>
<if test="fromuptimeEnd != null">
and tcp.fromuptime &lt;= ${fromuptimeEnd.value}
</if>
<if test="page != null">
<if test="page.sortname != null">
<if test="page.sortname == 'states'">
order by tcp.${page.sortname} ${page.sortorder}
</if>
<if test="page.sortname != 'states'">
order by pic.${page.sortname} ${page.sortorder}
</if>
</if>
limit ${page.start}, ${page.Pagesize}
</if>
</select>
<select id="listFinalCount" resultType="java.lang.Long" parameterType="java.util.Map">
select count(1)
from ocr_taskchild_picture tcp
left join ocr_picture pic
on tcp.PICTUREID = pic.ID
<include refid="Base_Where_union">
</include>
and tcp.ISFINAIL = 1
and pic.suspiciousfile = 0
<if test="thisLoginUserid != null and isFail ==null">
and tcp.ASSIGNEE ${thisLoginUserid.dataOp} ${thisLoginUserid.likestar}#{thisLoginUserid.value}${thisLoginUserid.likeend}
</if>
<if test="thisLoginUserid != null and isFail !=null">
and (tcp.ASSIGNEE ${thisLoginUserid.dataOp} ${thisLoginUserid.likestar}#{thisLoginUserid.value}${thisLoginUserid.likeend}
or tcp.STATES = 5)
</if>
<if test="fromuptimeStart != null">
and tcp.fromuptime &gt;= ${fromuptimeStart.value}
</if>
<if test="fromuptimeEnd != null">
and tcp.fromuptime &lt;= ${fromuptimeEnd.value}
</if>
</select>
<select id="listmytask" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro"
parameterType="java.util.Map">
select tcp.* from (
select tc.*,
uf.COMMENTHIS,
uf.TASKNAME as TASKNAMEHIS,
uf.STATSHIS,
uf.TASKNO,
op.field6 as fromCustomerLevel,
op.releaseArea as fromCity,
op.is_repeat,
tc.is_repeated_nodules as isRepeatedNodules
from ocr_taskchild_picture tc
LEFT JOIN OA_USERAPPROVE_T uf ON tc.ID = uf.ID
left join ocr_picture op on tc.PICTUREID = op.ID
where tc.ASSIGNEE = #{searchassignee}
and tc.TENANTID = #{searchtenantid}
and tc.STATES = 2
and op.suspiciousfile = 0
<if test="izApprovalStatus != null">
${izApprovalStatus.rulesOp}
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
UNION
select tc.*, uf.COMMENTHIS, uf.TASKNAME as TASKNAMEHIS, uf.STATSHIS, uf.TASKNO, op.field6 as fromCustomerLevel, op.releaseArea as fromCity, op.is_repeat,tc.is_repeated_nodules as isRepeatedNodules
from ocr_taskchild_picture tc, OA_USERAPPROVE_T uf, ocr_picture op
where tc.ID = uf.FORMID
and tc.PICTUREID = op.ID
and op.suspiciousfile = 0
and tc.TENANTID = #{searchtenantid}
<if test="thisLoginUserid != null">
and uf.USERID = #{thisLoginUserid}
</if>
<if test="izApprovalStatus != null">
${izApprovalStatus.rulesOp}
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
) as tcp
<include refid="Base_Where_union">
</include>
<include refid="Base_Where_Union_New">
</include>
<if test="page != null">
<if test="page.sortname != null">
order by tcp.${page.sortname} ${page.sortorder}
</if>
limit ${page.start}, ${page.Pagesize}
</if>
</select>
<select id="listmytaskCount" resultType="java.lang.Long" parameterType="java.util.Map">
select count(1) from (
select tc.*,
uf.COMMENTHIS,
uf.TASKNAME as TASKNAMEHIS,
uf.STATSHIS,
uf.TASKNO,
op.field6 as fromCustomerLevel,
op.releaseArea as fromCity,
op.is_repeat
from ocr_taskchild_picture tc
LEFT JOIN OA_USERAPPROVE_T uf ON tc.ID = uf.ID
left join ocr_picture op on tc.PICTUREID = op.ID
where tc.ASSIGNEE = #{searchassignee}
and tc.TENANTID = #{searchtenantid}
and tc.STATES = 2
and op.suspiciousfile = 0
<if test="izApprovalStatus != null">
${izApprovalStatus.rulesOp}
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
UNION
select tc.*, uf.COMMENTHIS, uf.TASKNAME as TASKNAMEHIS, uf.STATSHIS, uf.TASKNO, op.field6 as fromCustomerLevel, op.releaseArea as fromCity, op.is_repeat
from ocr_taskchild_picture tc, OA_USERAPPROVE_T uf, ocr_picture op
where tc.ID = uf.FORMID
and tc.PICTUREID = op.ID
and op.suspiciousfile = 0
and tc.TENANTID = #{searchtenantid}
<if test="thisLoginUserid != null">
and uf.USERID = #{thisLoginUserid}
</if>
<if test="izApprovalStatus != null ">
${izApprovalStatus.rulesOp}
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
) as tcp
<include refid="Base_Where_union">
</include>
<include refid="Base_Where_Union_New">
</include>
</select>
<select id="selectocpicture" resultType="String">
SELECT OCPICTUREID
FROM ocr_taskchild_picture
WHERE TENANTID = #{tenantid}
AND PACKAGEID = #{packageid}
AND ID = #{id}
</select>
<select id="getPictureHistoryList" resultType="cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo">
SELECT distinct t2.ID id,
t2.PICTUREID pictureId,
t2.STATES states,
t2.PROCESSINSTANCEID processInstanceId,
t2.PROCESSDEFINITIONID processDefinitionId,
t2.DEPLOYMENTID deploymentId,
t2.ASSIGNEENAME assigneeName,
t2.ASSIGNEE assignee,
t2.FILEANNEX fileAnnex,
t2.GUIDANG guiDang,
t2.CREATEUSER createUser,
t2.CREATEUSERNAME createUserName,
t2.CREATEDATE createDate,
t2.USERID userId,
t2.USERNAME userName,
t2.FROMTASKID fromTaskId,
t2.FROMTASKNAME fromTaskName,
t2.FROMUSERID fromUserId,
t2.FROMPROJECTID fromProjectId,
t2.FROMPLANID fromPlanId,
t2.FROMUPTIME fromupTime,
t2.FROMSOURCEID fromSourceId,
t2.HAVEPOINTS havePoints,
t2.TASKNAME taskName,
t2.TASKID taskId,
t2.FROMUSERNAME fromUserName,
t2.FROMPROJECTNAME fromProjectName,
t2.FINISHTIME finishTime,
t1.imgUrl,
t1.submit_date_timestamp submitDateTimestamp,
t1.photo_date_timestamp photoDateTimestamp,
t1.similarity_score similarityScore,
t1.server_thumbnail_url serverThumbnailUrl,
COALESCE(
(SELECT t3.STATSHIS
FROM oa_userapprove_t t3
WHERE t3.FORMID = t2.ID
AND t3.TASKINDEX = (SELECT TASKNODE
FROM ocr_taskchild_picture
WHERE PICTUREID = #{pictureId})
LIMIT 1),
1) AS historyStates
FROM ocr_picture t1
LEFT JOIN ocr_taskchild_picture t2
on t1.ID = t2.PICTUREID
where t1.suspiciousfile = 0
and t1.ID in
<foreach collection="pictureIds" open="(" close=")" item="item" separator="," index="index">
#{item}
</foreach>
</select>
<select id="getPictureDetail" resultMap="PictureResultMap">
SELECT t1.ID,
t1.imgUrl,
t1.taskName,
t1.work_status,
t1.field1,
t1.field2,
t1.field3,
t1.field4,
t1.field5,
t1.field6,
t1.field7,
t1.field8,
t1.field9,
t1.field10,
t1.field11,
t1.field12,
t1.field13,
t1.field14,
t1.field15,
t1.field16,
t1.field17,
t1.similarity_score,
t1.location,
t2.id,
t2.picture_id,
t2.img_size,
t2.img_format,
t2.img_measure,
t2.upload_time,
t2.create_time,
t2.img_space,
t2.tag_time,
t2.source,
t3.STATES,
t3.PROCESSINSTANCEID as processInstanceId,
t3.PROCESSDEFINITIONID as processDefinitionId,
t3.CREATEDATE,
t3.USERID,
t3.USERNAME,
t3.TASKNAME,
t3.FINISHTIME,
t3.ID as taskChildId,
t4.ID,
t4.USERID,
t4.FORMID,
t4.TASKNAME,
t4.STATSHIS,
t4.COMMENTHIS,
t4.TASKINDEX,
t4.TASKNO,
t4.USERNAME,
t4.CREATEDATE,
t4.TASKCOMMENT
FROM ocr_picture t1
LEFT JOIN ocr_picture_info t2 on t1.ID = t2.picture_id
LEFT JOIN ocr_taskchild_picture t3 on t1.ID = t3.PICTUREID
LEFT JOIN oa_userapprove_t t4 on t4.FORMID = t3.ID
where t1.ID = #{pictureId}
and t1.suspiciousfile = 0
</select>
<select id="getPackageSimilarityList" resultType="cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo">
SELECT distinct t3.ID id,
t3.PICTUREID pictureId,
t3.STATES states,
t3.PROCESSINSTANCEID processInstanceId,
t3.PROCESSDEFINITIONID processDefinitionId,
t3.DEPLOYMENTID deploymentId,
t3.ASSIGNEENAME assigneeName,
t3.ASSIGNEE assignee,
t3.FILEANNEX fileAnnex,
t3.GUIDANG guiDang,
t3.CREATEUSER createUser,
t3.CREATEUSERNAME createUserName,
t3.CREATEDATE createDate,
t3.USERID userId,
t3.USERNAME userName,
t3.FROMTASKID fromTaskId,
t3.FROMTASKNAME fromTaskName,
t3.FROMUSERID fromUserId,
t3.FROMPROJECTID fromProjectId,
t3.FROMPLANID fromPlanId,
t3.FROMUPTIME fromupTime,
t3.FROMSOURCEID fromSourceId,
t3.HAVEPOINTS havePoints,
t3.TASKNAME taskName,
t3.FROMUSERNAME fromUserName,
t3.FROMPROJECTNAME fromProjectName,
t3.FINISHTIME finishTime,
t3.TASKID taskId,
t2.imgUrl,
t2.submit_date_timestamp submitDateTimestamp,
t2.photo_date_timestamp photoDateTimestamp,
t2.server_thumbnail_url serverThumbnailUrl,
t1.max_similarity maxSimilarity,
COALESCE(
(SELECT t4.STATSHIS
FROM oa_userapprove_t t4
WHERE t4.FORMID = t3.ID
ORDER BY t4.CREATEDATE DESC
LIMIT 1), 1) AS historyStates,
t1.check_duplicate_id
FROM ocr_check_duplicate_result t1
LEFT JOIN ocr_picture t2 ON t1.picture_id = t2.ID
LEFT JOIN ocr_taskchild_picture t3 ON t2.ID = t3.PICTUREID
LEFT JOIN oa_userapprove_t t4 ON t3.ID = t4.FORMID and t4.TASKNAME = '${taskname}'
left join ocr_picture_info t5 on t2.ID = t5.picture_id
WHERE t1.check_duplicate_id = #{checkDuplicateId}
and t2.suspiciousfile = 0
<if test="pictureId != null and pictureId != ''">
and t1.picture_id != #{pictureId}
</if>
<if test="oderName == 'similarityScore'">
order by t1.max_similarity ${oderType},t1.similarity_group_order asc,t2.submit_date_timestamp asc
</if>
<if test="oderName == 'createdate'">
order by t2.submit_date_timestamp ${oderType}
</if>
</select>
<select id="getDubiousfileList" resultType="cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo">
SELECT t2.ID id,
t2.PICTUREID pictureId,
t2.STATES states,
t2.PROCESSINSTANCEID processInstanceId,
t2.PROCESSDEFINITIONID processDefinitionId,
t2.DEPLOYMENTID deploymentId,
t2.ASSIGNEENAME assigneeName,
t2.ASSIGNEE assignee,
t2.FILEANNEX fileAnnex,
t2.GUIDANG guiDang,
t2.CREATEUSER createUser,
t2.CREATEUSERNAME createUserName,
t2.CREATEDATE createDate,
t2.USERID userId,
t2.USERNAME userName,
t2.FROMTASKID fromTaskId,
t2.FROMTASKNAME fromTaskName,
t2.FROMUSERID fromUserId,
t2.FROMPROJECTID fromProjectId,
t2.FROMPLANID fromPlanId,
t2.FROMUPTIME fromupTime,
t2.FROMSOURCEID fromSourceId,
t2.HAVEPOINTS havePoints,
t2.TASKNAME taskName,
t2.TASKID taskId,
t2.FROMUSERNAME fromUserName,
t2.FROMPROJECTNAME fromProjectName,
t2.FINISHTIME finishTime,
t1.imgUrl,
ifnull(t3.STATSHIS, 1) historyStates,
t1.submit_date_timestamp submitDateTimestamp,
t1.photo_date_timestamp photoDateTimestamp,
t1.similarity_score similarityScore
FROM ocr_picture t1
LEFT JOIN ocr_taskchild_picture t2
on t1.ID = t2.PICTUREID
LEFT JOIN oa_userapprove_t t3 on t2.ID = t3.FORMID and t3.TASKNAME = '${taskname}'
where t1.ID in
<foreach collection="pictureIds" open="(" close=")" item="item" separator="," index="index">
#{item}
</foreach>
</select>
<select id="listFinalTask" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture"
parameterType="java.util.Map">
select tcp.*, pic.field11 reporttime, pic.similarity_score similarityscore,pic.server_thumbnail_url serverThumbnailUrl
from ocr_taskchild_picture tcp
left join ocr_picture pic
on tcp.PICTUREID = pic.ID
<include refid="Base_Where_union">
</include>
and tcp.ISFINAIL = 1
and pic.suspiciousfile = 0
<if test="thisLoginUserid != null and isFail ==null">
and tcp.ASSIGNEE ${thisLoginUserid.dataOp} ${thisLoginUserid.likestar}#{thisLoginUserid.value}${thisLoginUserid.likeend}
</if>
<if test="thisLoginUserid != null and isFail !=null">
and (tcp.ASSIGNEE ${thisLoginUserid.dataOp} ${thisLoginUserid.likestar}#{thisLoginUserid.value}${thisLoginUserid.likeend}
or tcp.STATES = 5)
</if>
<if test="fromuptimeStart != null">
and tcp.fromuptime &gt;= ${fromuptimeStart.value}
</if>
<if test="fromuptimeEnd != null">
and tcp.fromuptime &lt;= ${fromuptimeEnd.value}
</if>
<if test="page != null">
<if test="page.sortname != null">
<if test="page.sortname == 'states'">
order by tcp.${page.sortname} ${page.sortorder}
</if>
<if test="page.sortname != 'states'">
order by pic.${page.sortname} ${page.sortorder}
</if>
</if>
limit ${page.start}, ${page.Pagesize}
</if>
</select>
<select id="getSimilarityList" resultType="cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo">
SELECT distinct t3.ID id,
t3.PICTUREID pictureId,
t3.STATES states,
t3.PROCESSINSTANCEID processInstanceId,
t3.PROCESSDEFINITIONID processDefinitionId,
t3.DEPLOYMENTID deploymentId,
t3.ASSIGNEENAME assigneeName,
t3.ASSIGNEE assignee,
t3.FILEANNEX fileAnnex,
t3.GUIDANG guiDang,
t3.CREATEUSER createUser,
t3.CREATEUSERNAME createUserName,
t3.CREATEDATE createDate,
t3.USERID userId,
t3.USERNAME userName,
t3.FROMTASKID fromTaskId,
t3.FROMTASKNAME fromTaskName,
t3.FROMUSERID fromUserId,
t3.FROMPROJECTID fromProjectId,
t3.FROMPLANID fromPlanId,
t3.FROMUPTIME fromupTime,
t3.FROMSOURCEID fromSourceId,
t3.HAVEPOINTS havePoints,
t3.TASKNAME taskName,
t3.FROMUSERNAME fromUserName,
t3.FROMPROJECTNAME fromProjectName,
t3.FINISHTIME finishTime,
t3.TASKID taskId,
t2.imgUrl,
t2.submit_date_timestamp submitDateTimestamp,
t2.photo_date_timestamp photoDateTimestamp,
t2.server_thumbnail_url serverThumbnailUrl,
t2.similarity_score maxSimilarity,
COALESCE(
(SELECT t4.STATSHIS
FROM oa_userapprove_t t4
WHERE t4.FORMID = t3.ID
ORDER BY t4.CREATEDATE DESC
LIMIT 1), 1) AS historyStates
from ocr_picture t2
LEFT JOIN ocr_taskchild_picture t3 ON t2.ID = t3.PICTUREID
left join ocr_picture_info t5 on t2.ID = t5.picture_id
WHERE t2.suspiciousfile = 0
and t2.ID in
<foreach collection="pictureIds" open="(" close=")" item="item" separator="," index="index">
#{item}
</foreach>
</select>
</mapper>