<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-9-13 下午12:47:29  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (select b.cf_item_desc,a.cashflow_id,a.billing_amount,b.cf_item,b.cf_type,b.cf_type_desc
	from con_contract_cashflow a,hls_cashflow_item_v b,con_contract c 
 	where a.contract_id=c.contract_id and a.cf_direction='OUTFLOW' 
 	and a.cf_item=b.cf_item and c.contract_number=${@contract_number} and c.data_class = 'NORMAL') t #WHERE_CLAUSE#
 	
 	]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="cf_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="现金流类型"/>
        <bm:field name="cf_item_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forInsert="true" forQuery="true" physicalName="CF_ITEM_DESC" prompt="现金流项目"/>
        <bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" forInsert="true" physicalName="CASHFLOW_ID"/>
        <bm:field name="billing_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BILLING_AMOUNT" prompt="流出金额"/>
        <bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" forInsert="true" physicalName="CF_ITEM"/>
        <bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" forInsert="true" physicalName="CF_TYPE"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="cf_type_desc" queryExpression="t.cf_type_desc like ${@cf_type_desc}"/>
        <bm:query-field name="cf_item_desc" queryExpression="t.cf_item_desc like ${@cf_item_desc}"/>
    </bm:query-fields>
</bm:model>
