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

item:修改companyTreeByUserAndType树查询层级

parent 1728be37
...@@ -758,10 +758,15 @@ LEFT JOIN ( ...@@ -758,10 +758,15 @@ LEFT JOIN (
FROM FROM
cb_org_usr usr cb_org_usr usr
<where> <where>
usr.sequence_nbr IN ( SELECT getOrgUsrTreeById ( ( SELECT parent_id FROM cb_org_usr WHERE amos_org_id = #{userId} ) ) ) 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} ), '%' )
<if test="type != null and type != ''"> <choose>
<when test="type != null and type != ''">
AND usr.biz_org_type = #{type} AND usr.biz_org_type = #{type}
</if> </when>
<otherwise>
AND ( usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT')
</otherwise>
</choose>
</where> </where>
</select> </select>
</mapper> </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