<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-10-9 下午2:58:52  
    $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
    t1.FIN_STATEMENT_ID,
    t1.FIN_STATEMENT_TEMPLET_ID,
    t1.PROJECT_ID,
    t1.BP_ID,
    t1.RECORD_ID,
    t1.FISCAL_YEAR||'年' ||t1.FISCAL_MONTH||'月' FISCAL_YEAR,
    h.fin_statement_templet_name
FROM
    RSC_FIN_STATEMENT_PRJ_HDS t1,rsc_fin_statement_tmplt_hds h
    #WHERE_CLAUSE#
    order by FIN_STATEMENT_TEMPLET_ID,FISCAL_YEAR]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter name="query" expression="t1.FORECAST_FLAG=&apos;N&apos;"/>
        <bm:data-filter name="query" expression="h.fin_statement_templet_id=t1.fin_statement_templet_id"/>
    </bm:data-filters>
    <bm:fields>
        <bm:field name="fin_statement_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS.FIN_STATEMENT_ID"/>
        <bm:field name="fin_statement_templet_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_TEMPLET_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS.FIN_STATEMENT_TEMPLET_ID"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS.PROJECT_ID"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS.BP_ID"/>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS.RECORD_ID"/>
        <bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_TMPLT_HDS.FIN_STATEMENT_TEMPLET_NAME" queryWidth="120"/>
        <bm:field name="fiscal_year" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="FISCAL_YEAR" prompt="PRJ509.FISCAL_YEAR" queryWidth="120"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="bp_id" queryOperator="="/>
        <bm:query-field field="fin_statement_templet_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
