Commit 310d33e0 authored by 高建强's avatar 高建强

item:修改companyTreeByUserAndType树查询层级

parent 1728be37
......@@ -758,10 +758,15 @@ LEFT JOIN (
FROM
cb_org_usr usr
<where>
usr.sequence_nbr IN ( SELECT getOrgUsrTreeById ( ( SELECT parent_id FROM cb_org_usr WHERE amos_org_id = #{userId} ) ) )
<if test="type != null and type != ''">
AND usr.biz_org_type = #{type}
</if>
usr.biz_org_code LIKE CONCAT( ( SELECT SUBSTRING( biz_org_code, 1, LENGTH( biz_org_code ) - 6 ) FROM cb_org_usr WHERE amos_org_id = #{userId} ), '%' )
<choose>
<when test="type != null and type != ''">
AND usr.biz_org_type = #{type}
</when>
<otherwise>
AND ( usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT')
</otherwise>
</choose>
</where>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment