@ -186,6 +186,8 @@
and OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend}
</if>
<if test= "pictureresult != null" >
@ -307,8 +309,6 @@
</if>
<if test= "ocpictureid != null" >
and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend}
</if>
<if test= "pictureresult != null" >
@ -525,21 +525,22 @@
</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 >= '${izuptimeStart.value}' -->
<!-- </if> -->
<!-- <if test="izuptimeEnd != null"> -->
<!-- and tcp.FROMUPTIME <= '${izuptimeEnd.value}' -->
<!-- </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 >= '${izuptimeStart.value}' -->
<!-- </if> -->
<!-- <if test="izuptimeEnd != null"> -->
<!-- and tcp.FROMUPTIME <= '${izuptimeEnd.value}' -->
<!-- </if> -->
<if test= "izuptimeStart != null" >
<!-- 如果 izuptimeStart.dataOp 的值为 "<",则使用 "or" 连接 -->
<choose >
<when test= "izuptimeStart.rulesOp == 'or' || izuptimeEnd.rulesOp =='or'">
<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}')
and (tcp.FROMUPTIME ${izuptimeStart.dataOp} '${izuptimeStart.value}'
or tcp.FROMUPTIME ${izuptimeEnd.dataOp} '${izuptimeEnd.value}')
</if>
</when>
<otherwise >
@ -594,28 +595,22 @@
</if>
</select>
<select id= "listFinalCount" resultType= "java.lang.Long" parameterType= "java.util.Map" >
select count(tcp.ID) from (
select tc.*
from ocr_taskchild_picture tc,
OA_USERFINAL_T uf,
ocr_picture p
where tc.ID = uf.FORMID
and p.ID = tc.PICTUREID
and p.suspiciousfile = 0
<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
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 > = ${fromuptimeStart.value}
</if>
@ -628,56 +623,43 @@
parameterType="java.util.Map">
select tcp.* from (
select tc.*,
uf.COMMENTHIS,
uf.TASKNAME as TASKNAMEHIS,
uf.STATSHIS,
uf.TASKINDEX,
uf.TASKNO,
uf.COMMENTHIS,
uf.TASKNAME as TASKNAMEHIS,
uf.STATSHIS,
uf.TASKNO,
op.field6 as fromCustomerLevel,
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
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 ">
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)
)
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
UNION
select tc.*,
uf.COMMENTHIS,
uf.TASKNAME as TASKNAMEHIS,
uf.STATSHIS,
uf.TASKINDEX,
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
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}
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 ">
<if test= "izApprovalStatus != null" >
${izApprovalStatus.rulesOp}
(
#{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE(uf.STATSHIS , 1)
)
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
) as tcp
<include refid= "Base_Where_union" >
@ -692,25 +674,42 @@
</if>
</select>
<select id= "listmytaskCount" resultType= "java.lang.Long" parameterType= "java.util.Map" >
select count(tcp.ID) from (
select tc.*
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.*
from ocr_taskchild_picture tc,
OA_USERAPPROVE_T uf
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)
( #{izApprovalStatus.value} ${izApprovalStatus.dataOp} COALESCE (uf.STATSHIS
, 1)
)
</if>
) as tcp
@ -759,15 +758,22 @@
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,
t1.server_thumbnail_url serverThumbnailUrl
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
LEFT JOIN oa_userapprove_t t3 on t2.ID = t3.FORMID and t3.TASKNAME = '${taskname}'
where t1.suspiciousfile = 0
and t1.ID in
<foreach collection= "pictureIds" open= "(" close= ")" item= "item" separator= "," index= "index" >
@ -839,40 +845,45 @@
<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,
ifnull(t4.STATSHIS, 1) historyStates,
t1.check_duplicate_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
@ -934,4 +945,91 @@
#{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 > = ${fromuptimeStart.value}
</if>
<if test= "fromuptimeEnd != null" >
and tcp.fromuptime < = ${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>