<?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
                        cc.contract_number, --支付表编号
                        hcpch.hd_id,
                        cc.contract_name --支付表名称
                    FROM
                        hn_con_payment_con_hd hcpch,
                        con_contract cc
                    WHERE
                        hcpch.data_class      = 'NORMAL' AND
                        cc.contract_status <> ('CANCEL') AND
                        hcpch.wfl_status NOT IN ('APPROVED', 'APPROVING','PENDING') AND
                        hcpch.contract_id     = cc.contract_id
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="CONTRACT_NUMBER" prompt="支付表编号"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="CONTRACT_NAME" prompt="支付表名称"/>
        <bm:field name="hd_id"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="contract_number" queryOperator="like"/>
        <bm:query-field field="contract_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
