<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lgc5900  
    $Date: 2015年11月20日 下午5:37:04  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t2.contract_name,
                    t2.contract_number,
                    t2.employee_id_n,
                    t2.employee_id_of_manager_n,
                    t1.ccr_type,
                    t1.contract_id AS document_id
                FROM
                    con_contract_change_req_lv t1,
                    con_contract_lv t2
                WHERE
                    t1.change_req_id = t2.contract_id AND
                    t1.change_req_id = ${@contract_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER"/>
        <bm:field name="employee_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_N"/>
        <bm:field name="employee_id_of_manager_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_OF_MANAGER_N"/>
        <bm:field name="document_id"/>
        <bm:field name="ccr_type"/>
    </bm:fields>
</bm:model>
