<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    v.code_value AS mortgage_ast_classfication,
                    v.code_value_name AS mortgage_ast_classfication_n
                FROM
                    sys_code_values_v v
                WHERE
                    v.code                    = 'HLS209_ASSET_MORTGAGE' AND
                    v.code_enabled_flag       = 'Y' AND
                    v.code_value_enabled_flag = 'Y' AND
                    'MORTGAGE'                = ${@mortgage_type}
                UNION ALL
                SELECT
                    v.code_value AS mortgage_ast_classfication,
                    v.code_value_name AS mortgage_ast_classfication_n
                FROM
                    sys_code_values_v v
                WHERE
                    v.code                    = 'HLS209_ASSET_PLEDGE' AND
                    v.code_enabled_flag       = 'Y' AND
                    v.code_value_enabled_flag = 'Y' AND
                    'PLEDGE'                  = ${@mortgage_type}
            ]]></bm:query-sql>
            <!-- <bm:parameters>
                <bm:parameter name="mortgage_type"/>
            </bm:parameters> -->
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="mortgage_ast_classfication" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="150" forDisplay="true" forQuery="true" physicalName="MORTGAGE_AST_CLASSFICATION" prompt="抵质押分类代码"/>
        <bm:field name="mortgage_ast_classfication_n" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="150" forDisplay="true" forQuery="true" physicalName="MORTGAGE_AST_CLASSFICATION_N" prompt="抵质押分类描述"/>
    </bm:fields>
</bm:model>
