ludc
2024-02-01 a8d80ddd0aef61cbaf1dbe9fe7abec12f0835399
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -605,4 +605,26 @@
        and oid != #{currentOid}
    </select>
    <!--根据顶层节点oid查询所有叶子节点分类oid-->
    <select id="selectLeafByPid" resultType="com.vci.ubcs.code.entity.CodeClassify">
        select *
        from (
                 select
                     oid,
                     name,
                     id,
                     level lvl,
                     isparticipatecheck,
                     nvl((select 'N'
                          from PL_CODE_CLASSIFY pcc1
                          where pcc.oid = pcc1.PARENTCODECLASSIFYOID
                            and rownum &lt; 2),'Y') is_leaf
                 from PL_CODE_CLASSIFY pcc
                     start with pcc.oid = #{pid}
                 connect by pcc.PARENTCODECLASSIFYOID = prior oid
             ) plcls
        where
            is_leaf = 'Y'
    </select>
</mapper>