ludc
2023-12-03 25da36be2318c1247592dce7d499d0b985c80fe0
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -113,7 +113,6 @@
        order by lastmodifytime asc
    </select>
    <!--codeclassify0.parentCodeClassifyOid = '${oid}'-->
    <select id="selectAllLevelChildHasPath" resultMap="plCodeClassifyResultMap">
        select codeclassify0.OWNER as owner,
               codeclassify0.BTMTYPEID as btmtypeid,
@@ -305,7 +304,7 @@
        codeclassify0.ISPARTICIPATECHECK   as isParticipateCheck,
        coderuleoid.name                    as codeRuleOidName,
        codekeyattrrepeatoid.name           as codeKeyAttrRepeatOidName,
        coderesembleruleoid.name            as codeResembleRuleOidName,
        coderesembleruleoid.name            as codeResembleRuleOidName
        from pl_code_classify codeclassify0
        left join pl_code_rule coderuleoid
        on codeclassify0.codeRuleOid = coderuleoid.oid
@@ -411,7 +410,7 @@
        codeclassify0.ISPARTICIPATECHECK   as isParticipateCheck,
        coderuleoid.name                    as codeRuleOidName,
        codekeyattrrepeatoid.name           as codeKeyAttrRepeatOidName,
        coderesembleruleoid.name            as codeResembleRuleOidName,
        coderesembleruleoid.name            as codeResembleRuleOidName
        from pl_code_classify codeclassify0
        left join pl_code_rule coderuleoid
        on codeclassify0.codeRuleOid = coderuleoid.oid
@@ -560,12 +559,6 @@
            connect by prior codeclassify0.PARENTCODECLASSIFYOID = codeclassify0.oid
    </select>
    <select id="selectStartWithCurrentOid" resultMap="plCodeClassifyResultMap">
        select * from <include refid="tableName"/>
                          start with oid = #{oid}
        connect by prior oid = parentcodeclassifyoid;
    </select>
    <update id="batchUpdateLcStatus" parameterType="java.util.List">
        BEGIN
        <foreach collection="records" item="item" index="index" separator=";">
@@ -585,4 +578,28 @@
        connect by p.oid = prior p.PARENTCODECLASSIFYOID
    </select>
    <select id="selectLeafByParentClassifyOid" 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.PARENTCODECLASSIFYOID = #{topOid}
                connect by pcc.PARENTCODECLASSIFYOID = prior oid
            ) plcls
        where
        is_leaf = 'Y'
        and isparticipatecheck = 0
        and oid != #{currentOid}
    </select>
</mapper>