<?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.attribute_1 head_flag,
                    t.attribute_2 bank_name,
                    t.attribute_3 import_date,
                    t.attribute_4 row_amount, --代扣总笔数
                    t.attribute_5/100 due_amount, --代扣金额
                    t.attribute_6 , --成功笔数
                    t.attribute_7/100 as attribute_7, --成功金额
                    t.attribute_8, --失败笔数
                    t.attribute_9  -- 文件名
                FROM
                    fnd_interface_lines t
                WHERE
                    t.header_id   =${@header_id} AND
                    t.line_number = 0
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="head_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="HEAD_FLAG"/>
        <bm:field name="bank_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_NAME"/>
        <bm:field name="import_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IMPORT_DATE"/>
        <bm:field name="row_amount" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ROW_AMOUNT"/>
        <bm:field name="due_amount" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DUE_AMOUNT"/>
        <bm:field name="attribute_6" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
        <bm:field name="attribute_7" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
        <bm:field name="attribute_8" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
        <bm:field name="attribute_9" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
    </bm:fields>
</bm:model>
