<?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
                    t.loan_contract_id,
                    t.loan_contract_number,
                    t.loan_con_bp_n
                    || t.loan_amount
                    || t.loan_con_type_detail_n AS loan_contract_name
                FROM
                    tre_loan_contract_v t
                WHERE
                    t.loan_contract_status = 'REVIEWED') tt
                   #WHERE_CLAUSE# 
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="loan_contract_id"/>
        <bm:field name="loan_contract_number" forDisplay="true" prompt="合同编号"/>
        <bm:field name="loan_contract_name" displayWidth="380" forDisplay="true" forQuery="true" prompt="合同名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="loan_contract_number" queryExpression="tt.loan_contract_number like ${@loan_contract_number}"/>
        <bm:query-field name="loan_contract_name" queryExpression="tt.loan_contract_name like &apos;%&apos;||${@loan_contract_name}||&apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
