下级已办待办查询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
LEFT JOIN TSTwfProcessNode n on ta.WorkflowID = n.processid
where ta.BUSSTATUS in ('-1', '0', '1', '3', '5')
<where>
<if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''">
<choose>
<when test='customParamMap.childUnitSwitch eq "1"'>
and (
n.CURRUSERID = #{customParamMap.userId}
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}
and torg.ORGNUMBER != #{customParamMap.myOrgNumber}
))
</when>
<otherwise>
and n.CURRUSERID = #{customParamMap.userId}
</otherwise>
</choose>
</if>
</where>
<if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''">
<choose>
<when test='customParamMap.childUnitSwitch eq "1"'>
and (
n.CURRUSERID = #{customParamMap.userId}
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}
and torg.ORGNUMBER != #{customParamMap.myOrgNumber}
))
</when>
<otherwise>
and n.CURRUSERID = #{customParamMap.userId}
</otherwise>
</choose>
</if>
)
) m
<where>