<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2014-12-24 上午9:46:34  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CONTRACT_INDICATOR_REP" defaultOrderBy="t1.contract_indicator_rep_id">
    <bm:fields>
        <bm:field name="contract_indicator_rep_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_INDICATOR_REP_ID" prompt="CONTRACT_INDICATOR_REP.CONTRACT_INDICATOR_REP_ID"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_NAME" prompt="CONTRACT_INDICATOR_REP.UNIT_NAME"/>
        <bm:field name="prj_lease_channel_00" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRJ_LEASE_CHANNEL_00" prompt="CONTRACT_INDICATOR_REP.PRJ_LEASE_CHANNEL_00"/>
        <bm:field name="prj_lease_channel_01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRJ_LEASE_CHANNEL_01" prompt="CONTRACT_INDICATOR_REP.PRJ_LEASE_CHANNEL_01"/>
        <bm:field name="prj_lease_channel_02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRJ_LEASE_CHANNEL_02" prompt="CONTRACT_INDICATOR_REP.PRJ_LEASE_CHANNEL_02"/>
        <bm:field name="prj_complete_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRJ_COMPLETE_NUMBER" prompt="CONTRACT_INDICATOR_REP.PRJ_COMPLETE_NUMBER"/>
        <bm:field name="incept_lease_channel_00" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INCEPT_LEASE_CHANNEL_00" prompt="CONTRACT_INDICATOR_REP.INCEPT_LEASE_CHANNEL_00"/>
        <bm:field name="incept_lease_channel_01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INCEPT_LEASE_CHANNEL_01" prompt="CONTRACT_INDICATOR_REP.INCEPT_LEASE_CHANNEL_01"/>
        <bm:field name="incept_lease_channel_02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INCEPT_LEASE_CHANNEL_02" prompt="CONTRACT_INDICATOR_REP.INCEPT_LEASE_CHANNEL_02"/>
        <bm:field name="incept_complete_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INCEPT_COMPLETE_NUMBER" prompt="CONTRACT_INDICATOR_REP.INCEPT_COMPLETE_NUMBER"/>
        <bm:field name="lease_channel_00_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_00_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_00_AMOUNT"/>
        <bm:field name="lease_channel_01_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_01_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_01_AMOUNT"/>
        <bm:field name="lease_channel_02_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_02_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_02_AMOUNT"/>
        <bm:field name="amount_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AMOUNT_COUNT" prompt="CONTRACT_INDICATOR_REP.AMOUNT_COUNT"/>
        <bm:field name="lease_channel_00_ls_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_00_LS_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_00_LS_AMOUNT"/>
        <bm:field name="lease_channel_01_ls_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_01_LS_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_01_LS_AMOUNT"/>
        <bm:field name="lease_channel_02_ls_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_CHANNEL_02_LS_AMOUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_CHANNEL_02_LS_AMOUNT"/>
        <bm:field name="lease_amount_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_AMOUNT_COUNT" prompt="CONTRACT_INDICATOR_REP.LEASE_AMOUNT_COUNT"/>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="CONTRACT_INDICATOR_REP.USER_ID"/>
        <bm:field name="show_level" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SHOW_LEVEL" prompt="CONTRACT_INDICATOR_REP.SHOW_LEVEL"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
    </bm:query-fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="contract_indicator_rep_id"/>
    </bm:primary-key>
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
       
             BEGIN
                 yonda_con_contract_report_pkg.insert_contract_indicator_rep(p_start_date =>to_date(${@start_date},'yyyy-mm-dd'), 
                                                                             p_end_date =>to_date(${@end_date},'yyyy-mm-dd'),
                                                                             p_user_id =>${/session/@user_id});
             END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
