下级已办待办查询BUG修复

This commit is contained in:
黎润豪 2026-02-28 09:06:03 +08:00
parent 048059e46b
commit 411bbfc6c1
1 changed files with 15 additions and 17 deletions

View File

@ -647,23 +647,21 @@
from TSTaskList ta from TSTaskList ta
LEFT JOIN TSTwfProcessNode n on ta.WorkflowID = n.processid LEFT JOIN TSTwfProcessNode n on ta.WorkflowID = n.processid
where ta.BUSSTATUS in ('-1', '0', '1', '3', '5') where ta.BUSSTATUS in ('-1', '0', '1', '3', '5')
<where> <if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''">
<if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''"> <choose>
<choose> <when test='customParamMap.childUnitSwitch eq "1"'>
<when test='customParamMap.childUnitSwitch eq "1"'> and (
and ( n.CURRUSERID = #{customParamMap.userId}
n.CURRUSERID = #{customParamMap.userId} or exists(select 1 from CXAICORG.T_USERS tu left join CXAICORG.T_ORGUNITS torg on tu.ORGUNITID = torg.ORGUNITID
or exists(select 1 from CXAICORG.T_USERS tu left join CXAICORG.T_ORGUNITS torg on tu.ORGUNITID = torg.ORGUNITID where n.CURRUSERID = tu.USERID and torg.ORGNUMBER like #{customParamMap.myOrgNumberLike}
where n.CURRUSERID = tu.USERID and torg.ORGNUMBER like #{customParamMap.myOrgNumberLike} and torg.ORGNUMBER != #{customParamMap.myOrgNumber}
and torg.ORGNUMBER != #{customParamMap.myOrgNumber} ))
)) </when>
</when> <otherwise>
<otherwise> and n.CURRUSERID = #{customParamMap.userId}
and n.CURRUSERID = #{customParamMap.userId} </otherwise>
</otherwise> </choose>
</choose> </if>
</if>
</where>
) )
) m ) m
<where> <where>