<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: yuminhui 
    $Date: 2015-10-14 下午5:10:50  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    cc.*
                FROM
                    (SELECT
                        rownum row_num,
                        b.bp_id,
                        h.bp_name,                                            --商业伙伴名称
                        h.bp_type_n,                                          --商业伙伴类型
                        b.bank_account_code,                                  --账户编号
                        b.bank_account_name,                                  --账户名称
                        b.bank_account_num,                                   --银行账号
                        b.bank_full_name,                                     --银行全称
                        b.bank_branch_name,                                   --支行名称
                        b.currency_n,                                         --币种
                        b.country_id_n,                                       --国家
                        b.province_id_n,                                      --省份
                        b.city_id_n,                                          --市
                        b.district_id_n,                                      --区/县
                        DECODE(b.enabled_flag,'Y','是','N','否') enabled_flag_n --启用
                    FROM
                        hls_bp_master_bank_account_lv b,
                        hls_bp_master_lv h
                    WHERE
                        b.bp_id = h.bp_id
                    ) cc #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <!-- <bm:fields>
        <bm:field name="row_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ROW_NUM"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" required="true"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME"/>
        <bm:field name="bp_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE_N"/>
        <bm:field name="bank_account_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_CODE"/>
        <bm:field name="bank_account_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NAME"/>
        <bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NUM"/>
        <bm:field name="bank_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_FULL_NAME"/>
        <bm:field name="bank_branch_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_BRANCH_NAME"/>
        <bm:field name="currency_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_N"/>
        <bm:field name="country_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COUNTRY_ID_N"/>
        <bm:field name="province_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROVINCE_ID_N"/>
        <bm:field name="city_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CITY_ID_N"/>
        <bm:field name="district_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISTRICT_ID_N"/>
        <bm:field name="enabled_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG_N"/>
    </bm:fields> -->
    <bm:query-fields>
        <!--         <bm:query-field name="bp_name" queryOperator="like"/>
        <bm:query-field name="bank_account_name" queryOperator="like"/>
        <bm:query-field name="bank_branch_name" queryOperator="like"/> -->
        <bm:query-field name="bp_name" queryExpression="cc.bp_name like ${@bp_name}"/>
        <bm:query-field name="bank_account_name" queryExpression="cc.bank_account_name like ${@bank_account_name}"/>
        <bm:query-field name="bank_branch_name" queryExpression="cc.bank_branch_name like ${@bank_branch_name}"/>
    </bm:query-fields>
</bm:model>
