<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-6-3 下午01:12:22  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="RSC_FIN_STATEMENT_PRJ_HDS_V" defaultOrderBy="fiscal_year desc,fiscal_month desc">
    <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_V.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_PRJ_HDS_V.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_PRJ_HDS_V.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="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_CODE"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.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="RSC_FIN_STATEMENT_PRJ_HDS_V.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="RSC_FIN_STATEMENT_PRJ_HDS_V.PROJECT_NUMBER"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.PROJECT_NAME"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.CURRENCY_CODE"/>
        <bm:field name="currency_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.CURRENCY_NAME"/>
        <bm:field name="fiscal_year" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="fiscal_month" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="fiscal_date" databaseType="VARCHAR2" datatype="java.lang.String" expression="(t1.fiscal_year || &apos;年&apos; || t1.fiscal_month || &apos;月&apos;)"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="bp_id" queryOperator="="/>
        <bm:query-field field="fin_statement_templet_id" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="exists (select 1 from rsc_fin_statement_prj_lns ln where ln.fin_statement_id=t1.fin_statement_id)"/>
    </bm:data-filters>
</bm:model>
