<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-7-24 下午7:36:34  
    $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 'line_number' column_name, '序号' field_description, 'left' column_align, 50 field_width FROM dual
                UNION ALL
                SELECT 'item_desc' column_name, '报表项名称' field_description, 'left' column_align,150 field_width FROM dual
                UNION ALL
                SELECT
                    *
                FROM
                    (SELECT
                        'a'
                       /*  || v.fiscal_year column_name, --modify zxt 事故单90503 导入时不显示数据 */
                        || v.fiscal_year || v.fiscal_month column_name,
                        v.fiscal_year
                        || '年'
                        || DECODE(v.fiscal_month, NULL, '', v.fiscal_month
                        || '月') field_description,
                        'right' column_align,
                        110 field_width
                    FROM
                        rsc_fin_statement_prj_tmp v
                    WHERE
                        v.session_id = ${/session/@session_id}
                    GROUP BY
                        v.fiscal_year,
                        v.fiscal_month
                    ORDER BY
                        v.fiscal_year
                    )
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/>
        <bm:field name="field_description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIELD_DESCRIPTION"/>
        <bm:field name="column_align" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_ALIGN"/>
        <bm:field name="field_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIELD_WIDTH"/>
    </bm:fields>
</bm:model>
