|
|
|
@ -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}
|
|
|
|
|
</if>
|
|
|
|
@ -628,54 +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.TASKINDEX,
|
|
|
|
|
uf.TASKNO,
|
|
|
|
|
|
|
|
|
|
op.field6 as fromCustomerLevel,
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
from ocr_taskchild_picture tc,
|
|
|
|
|
OA_USERAPPROVE_T uf,
|
|
|
|
|
ocr_picture op
|
|
|
|
|
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
|
|
|
|
|
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">
|
|
|
|
@ -694,22 +678,22 @@
|
|
|
|
|
select tc.*
|
|
|
|
|
from ocr_taskchild_picture tc
|
|
|
|
|
where tc.ASSIGNEE = #{searchassignee}
|
|
|
|
|
and tc.TENANTID = #{searchtenantid}
|
|
|
|
|
and tc.STATES = 2
|
|
|
|
|
and tc.TENANTID = #{searchtenantid}
|
|
|
|
|
and tc.STATES = 2
|
|
|
|
|
UNION
|
|
|
|
|
select tc.*
|
|
|
|
|
from ocr_taskchild_picture tc,
|
|
|
|
|
OA_USERAPPROVE_T uf
|
|
|
|
|
OA_USERAPPROVE_T uf
|
|
|
|
|
where tc.ID = uf.FORMID
|
|
|
|
|
and tc.TENANTID = #{searchtenantid}
|
|
|
|
|
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">
|
|
|
|
@ -837,44 +821,48 @@
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
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
|
|
|
|
@ -932,4 +920,41 @@
|
|
|
|
|
#{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
|
|
|
|
|
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}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromuptimeEnd != null">
|
|
|
|
|
and tcp.fromuptime <= ${fromuptimeEnd}
|
|
|
|
|
</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>
|
|
|
|
|
</mapper>
|
|
|
|
|