<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
                SELECT
                    pp.project_id,
                    pp.virtual_con_number,
                    pp.virtual_con_name
                FROM
                    prj_project pp
                WHERE
                    pp.data_class  = 'VIRTUAL_CON' AND
                    pp.project_id IN
                    (SELECT
                        cc.project_id
                    FROM
                        con_contract cc
                    WHERE
                        cc.data_class      = 'NORMAL' 
                    )
                    ) t1 #WHERE_CLAUSE#
                    order by  t1.virtual_con_number
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="virtual_con_number" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="VIRTUAL_CON_NUMBER" prompt="合同编号"/>
        <bm:field name="virtual_con_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="VIRTUAL_CON_NAME" prompt="合同名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="virtual_con_number" queryOperator="like"/>
        <bm:query-field field="virtual_con_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
