left join ocr_contractor_task oct on pic.tenant_id = oct.tenant_id and pic.${contractor.value} = oct.contractor
<includerefid="Base_Where_union">
</include>
and tcp.ISFINAIL = 1
@ -1034,8 +1035,9 @@
</if>
<iftest="thisLoginUserid != null and isFail != null">
and (FIND_IN_SET(#{thisLoginUserid.value}
, tcp.ASSIGNEE)
or tcp.STATES = 5)
, tcp.ASSIGNEE) or
if((select count(1) from ocr_contractor_task where tenant_id =#{tenantid.value} and pic.${contractor.value} = contractor and task_user_assignee = #{thisLoginUserid.value})>1, 1=1,tcp.STATES = 5))
<!-- or (oct.id is not null and oct.tenant_id = #{tenantid}) or tcp.STATES = 5)-->