<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF  
    $Date: 2015-1-8 下午12:46:54  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_DOCUMENT_NODE_STATUS_V" needAccessControl="false">
    <bm:fields>
        <bm:field name="company_id"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="HLS_DOCUMENT_NODE_STATUS_V.PROJECT_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HLS_DOCUMENT_NODE_STATUS_V.CONTRACT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="HLS_DOCUMENT_NODE_STATUS_V.PROJECT_NUMBER"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HLS_DOCUMENT_NODE_STATUS_V.CONTRACT_NUMBER"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="HLS_DOCUMENT_NODE_STATUS_V.BP_NAME"/>
        <bm:field name="inception_of_lease" databaseType="DATE" datatype="java.util.Date" physicalName="INCEPTION_OF_LEASE" prompt="HLS_DOCUMENT_NODE_STATUS_V.INCEPTION_OF_LEASE"/>
        <bm:field name="lease_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_END_DATE" prompt="HLS_DOCUMENT_NODE_STATUS_V.LEASE_END_DATE"/>
        <bm:field name="lease_times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_TIMES" prompt="HLS_DOCUMENT_NODE_STATUS_V.LEASE_TIMES"/>
        <bm:field name="node_seq_10" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_10" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_10"/>
        <bm:field name="node_seq_20" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_20" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_20"/>
        <bm:field name="node_seq_30" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_30" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_30"/>
        <bm:field name="node_seq_40" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_40" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_40"/>
        <bm:field name="node_seq_50" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_50" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_50"/>
        <bm:field name="node_seq_60" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_60" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_60"/>
        <bm:field name="node_seq_70" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_70" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_70"/>
        <bm:field name="node_seq_80" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_80" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_80"/>
        <bm:field name="node_seq_90" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_90" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_90"/>
        <bm:field name="node_seq_100" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_100" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_100"/>
        <bm:field name="node_seq_110" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_110" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_110"/>
        <bm:field name="node_seq_115" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_115" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_115"/>
        <bm:field name="node_seq_120" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_120" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_120"/>
        <bm:field name="node_seq_150" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_150" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_150"/>
        <bm:field name="node_seq_160" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_160" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_160"/>
        <bm:field name="node_seq_170" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_170" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_170"/>
        <bm:field name="node_seq_180" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_180" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_180"/>
        <bm:field name="node_seq_190" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_SEQ_190" prompt="HLS_DOCUMENT_NODE_STATUS_V.NODE_SEQ_190"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="project_id" queryOperator="="/>
        <bm:query-field field="contract_id" queryOperator="="/>
        <bm:query-field field="project_number" queryOperator="like"/>
        <bm:query-field field="contract_number" queryOperator="like"/>
        <bm:query-field name="company_authority" queryExpression="t1.company_id in (select company_id from fnd_companies start with company_id =${@company_authority} connect by prior company_id = parent_biz_company_id)"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="exists  (select 1           from aut_trx_user_authorize a1, aut_owner_user_authorize a2          where a1.trx_category = &apos;PROJECT&apos;            and a1.trx_id = t1.project_id            and trunc(sysdate) between a1.start_date and                nvl(a1.end_date, trunc(sysdate))            and a1.user_id = a2.owner_user_id            and a1.trx_category = a2.trx_category            and a2.authorized_user_id = ${/session/@user_id}            and trunc(sysdate) between a2.start_date and                nvl(a2.end_date, trunc(sysdate)))    "/>
    </bm:data-filters>
</bm:model>
