<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-6-8 下午02:48:34  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="RSC_FIN_STATEMENT_PRJ_HDS_V">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT DISTINCT
                        t1.FIN_STATEMENT_TEMPLET_ID,
                        t1.FIN_STATEMENT_TEMPLET_CODE,
                        t1.FIN_STATEMENT_TEMPLET_NAME,
                        t1.BP_ID,
                        t1.BP_CODE,
                        t1.BP_NAME,
                        t1.BP_CATEGORY,
                        t1.BP_TYPE,
                        t1.PROJECT_ID,
                        t1.PROJECT_NUMBER,
                        t1.PROJECT_NAME,
                        t1.currency_code,
                        t1.CURRENCY_NAME
                    FROM
                        RSC_FIN_STATEMENT_PRJ_HDS_V t1
                    ) v #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <!-- <bm:field name="fin_statement_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.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="fin_statement_templet_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_CODE" prompt="RSC_FIN_STATEMENT_TMPLT_HDS.FIN_STATEMENT_TEMPLET_CODE"/>
        <bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_TMPLT_HDS.FIN_STATEMENT_TEMPLET_NAME"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_ID"/>
        <bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CODE" prompt="HLS.BP_CODE"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="HLS.BP_NAME"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_CATEGORY"/>
        <bm:field name="bp_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE" prompt="HLS.BP_TYPE"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.PROJECT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="RSC501.PRJ_PROJECT.PROJECT_NUMBER"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="RSC501.PRJ_PROJECT.PROJECT_NAME"/>
        <bm:field name="currency_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_NAME" prompt="RSC501.PRJ_PROJECT.CURRENCY_NAME"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="fin_statement_templet_id" queryOperator="="/>
        <bm:query-field field="bp_id" queryOperator="="/>
        <!-- <bm:query-field name="creation_date_from" queryExpression="t1.creation_date &gt;=${@creation_date_from}"/>
        <bm:query-field name="creation_date_to" queryExpression="t1.creation_date &lt;=${@creation_date_to}"/> -->
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="project_id" expression="project_id is null"/>
    </bm:data-filters>
</bm:model>
