yuxc
2023-05-25 27f7b8f0459ed7c91cd532ae04c9aa3d15d11d84
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -52,9 +52,9 @@
    </select>
    <select id="checkHasChild" resultType="java.lang.Boolean">
        select count(oid)
        <![CDATA[select count(oid)
        from PL_CODE_CLASSIFY
        where parentCodeClassifyOid = #{oid}
        where parentCodeClassifyOid = #{oid}]]>
    </select>
    <select id="selectCodeClassifyVOByTree" resultMap="plCodeClassifyResultMap">
@@ -141,7 +141,8 @@
    </select>
    <select id="selectAllLevelParentByOid" resultType="java.util.HashMap">
        select oid,level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid
        select oid,
               level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid
    </select>
    <select id="selectByFieldNamePath"  resultMap="plCodeClassifyResultMap">
@@ -167,11 +168,11 @@
               codeclassify0.paths                 as paths
        from (select plcodeclassify.*,
                <choose>
                     <when test="fieldName=='name'.tostring()">
                        SYS_CONNECT_BY_PATH(name, '##') as paths
                     <when test='fieldName=="name"'>
                         SUBSTR(SYS_CONNECT_BY_PATH(name, '##'),3)   as paths
                     </when>
                    <otherwise>
                        SYS_CONNECT_BY_PATH(id, '##') as paths
                        SUBSTR(SYS_CONNECT_BY_PATH(id, '##'),3)   as paths
                    </otherwise>
                </choose>