<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2017-7-25 上午10:37:12  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HN_OTHER_CON_CHANGE_REQ_V">
    <bm:fields>
        <bm:field name="change_req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANGE_REQ_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.CHANGE_REQ_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.CONTRACT_ID"/>
        <bm:field name="new_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="NEW_CONTRACT_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.NEW_CONTRACT_ID"/>
        <bm:field name="wfl_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WFL_STATUS" prompt="HN_OTHER_CON_CHANGE_REQ_V.WFL_STATUS"/>
        <bm:field name="wfl_instance_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WFL_INSTANCE_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.WFL_INSTANCE_ID"/>
        <bm:field name="req_date" databaseType="DATE" datatype="java.util.Date" physicalName="REQ_DATE" prompt="HN_OTHER_CON_CHANGE_REQ_V.REQ_DATE"/>
        <bm:field name="req_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REQ_USER_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.REQ_USER_ID"/>
        <bm:field name="req_user_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQ_USER_ID_N" prompt="HN_OTHER_CON_CHANGE_REQ_V.REQ_USER_ID_N"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HN_OTHER_CON_CHANGE_REQ_V.DESCRIPTION"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HN_OTHER_CON_CHANGE_REQ_V.CONTRACT_NUMBER"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.COMPANY_ID"/>
        <bm:field name="company_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_CODE" prompt="HN_OTHER_CON_CHANGE_REQ_V.COMPANY_CODE"/>
        <bm:field name="company_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_NAME" prompt="HN_OTHER_CON_CHANGE_REQ_V.COMPANY_NAME"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="HN_OTHER_CON_CHANGE_REQ_V.CONTRACT_NAME"/>
        <bm:field name="con_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CON_BP_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.CON_BP_ID"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="HN_OTHER_CON_CHANGE_REQ_V.BP_NAME"/>
        <bm:field name="lease_terms" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_TERMS" prompt="HN_OTHER_CON_CHANGE_REQ_V.LEASE_TERMS"/>
        <bm:field name="contract_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_AMOUNT" prompt="HN_OTHER_CON_CHANGE_REQ_V.CONTRACT_AMOUNT"/>
        <bm:field name="data_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_CLASS" prompt="HN_OTHER_CON_CHANGE_REQ_V.DATA_CLASS"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.UNIT_ID"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_NAME" prompt="HN_OTHER_CON_CHANGE_REQ_V.UNIT_NAME"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.OWNER_USER_ID"/>
        <bm:field name="owner_user_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OWNER_USER_ID_N" prompt="HN_OTHER_CON_CHANGE_REQ_V.OWNER_USER_ID_N"/>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID" prompt="HN_OTHER_CON_CHANGE_REQ_V.EMPLOYEE_ID"/>
        <bm:field name="employee_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_NAME" prompt="HN_OTHER_CON_CHANGE_REQ_V.EMPLOYEE_NAME"/>
        <bm:field name="employee_id_of_manager" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID_OF_MANAGER" prompt="HN_OTHER_CON_CHANGE_REQ_V.EMPLOYEE_ID_OF_MANAGER"/>
        <bm:field name="wfl_status_n" expression="(SELECT         v.code_value_name    FROM sys_code_values_v v  WHERE v.code = &apos;OTHER_CONRACT_WFL_STATUS&apos; and v.code_value = t1.wfl_status)"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="change_req_id" queryOperator="="/>
        <bm:query-field field="contract_id" queryOperator="="/>
        <bm:query-field field="new_contract_id" queryOperator="="/>
        <bm:query-field field="wfl_status" queryOperator="="/>
        <bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
        <bm:query-field name="contract_name" queryExpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos;"/>
        <bm:query-field name="bp_name" queryExpression="t1.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter expression="wfl_status &lt;&gt; &apos;CANCEL&apos;"/>
    </bm:data-filters>
</bm:model>
