ludc
2023-10-31 c2efc1b0dfe76f5603dee63a917d3b7415053330
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -38,6 +38,7 @@
        <result column="CODEKEYATTRREPEATOID" property="codeKeyAttrRepeatOid"/>
        <result column="CODERESEMBLERULEOID" property="codeResembleRuleOid"/>
        <result column="TENANT_ID" property="tenantId"/>
        <result column="TOTAL" property="total"/>
    </resultMap>
    <sql id="tableName">
@@ -89,12 +90,12 @@
               codekeyattrrepeatoid.name           as codeKeyAttrRepeatOidName,
               coderesembleruleoid.name            as codeResembleRuleOidName
        from pl_code_classify codeclassify0
                 left join pl_code_rule coderuleoid
                           on codeclassify0.codeRuleOid = coderuleoid.oid
                 left join pl_code_keyattrrepeat codekeyattrrepeatoid
                           on codeclassify0.codeKeyAttrRepeatOid = codekeyattrrepeatoid.oid
                 left join pl_code_resemblerule coderesembleruleoid
                           on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid
             left join pl_code_rule coderuleoid
                       on codeclassify0.codeRuleOid = coderuleoid.oid
             left join pl_code_keyattrrepeat codekeyattrrepeatoid
                       on codeclassify0.codeKeyAttrRepeatOid = codekeyattrrepeatoid.oid
             left join pl_code_resemblerule coderesembleruleoid
                       on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid
        <where>
             1=1
            <if test="oid != null and oid != ''">
@@ -294,7 +295,28 @@
        codeclassify0.TENANT_ID             as tenantId ,
        coderuleoid.name                    as codeRuleOidName,
        codekeyattrrepeatoid.name           as codeKeyAttrRepeatOidName,
        coderesembleruleoid.name            as codeResembleRuleOidName
        coderesembleruleoid.name            as codeResembleRuleOidName,
        (
            SELECT
                COUNT(*)
            FROM
                PLBT_CODE_part
            WHERE
                CODECLSFID IN (
                    SELECT
                    oid
                    FROM
                    PL_CODE_CLASSIFY
                    WHERE
                    lcstatus = 'Enabled'
                    START WITH
                    OID = codeclassify0.OID
                    CONNECT BY
                    PRIOR OID = parentCodeClassifyOid
                )
                AND lastr = '1'
                AND lastv = '1'
        ) AS total
        from pl_code_classify codeclassify0
        left join pl_code_rule coderuleoid
        on codeclassify0.codeRuleOid = coderuleoid.oid
@@ -504,6 +526,7 @@
        start with oid = #{oid}
        connect by prior oid = parentcodeclassifyoid;
    </select>
    <select id="selectAllParenClassifytByOid" resultMap="plCodeClassifyResultMap">
        select codeclassify0.OWNER                 as owner,
        codeclassify0.BTMTYPEID             as btmtypeid,