<?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
                    t.para_code,
                    t.para_desc
                FROM
                    psr_lov_config_line t
                WHERE
                    t.header_id               =SUBSTR(${@header_id},4) AND
                    t.for_query               = 'Y' AND
                    SUBSTR(${@header_id},0,3) = 'CUS'
                UNION ALL
                SELECT
                    'value_code' para_code,
                    '代码' para_desc
                FROM
                    dual
                WHERE
                    SUBSTR(${@header_id},0,3) = 'COM'
                UNION ALL
                SELECT
                    'value_name' para_code,
                    '描述' para_desc
                FROM
                    dual
                WHERE
                    SUBSTR(${@header_id},0,3) = 'COM'
            ]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter name="header_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="para_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARA_CODE"/>
        <bm:field name="para_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARA_DESC"/>
    </bm:fields>
</bm:model>
