<?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 hvcm.accounts_contract_number, --基础合同编号
			       hvcm.accounts_contract_name,   --基础合同名称
			       hvcm.book_value,               --应收账款总额(万)
			       hvcm.accounts_debetor_name,    --债务人名称
			       hvcm.accounts_debetor_address, --债务人地址
			       hvcm.acc_bank_name,            --指定银行
			       hvcm.acc_bank_account_name,    --账户名称
			       hvcm.acc_bank_branch_name,     --指定开户行
			       hvcm.acc_bank_account_number,  --账户编号
			       hvcm.mortgage_number,          --抵质押编号
			       hvcm.mortgage_registed_dept,         --登记机关
			       (hn_report_pkg.get_prj_filr_name(p_check_id => hvcm.mortgage_id,
                                              		p_table_name => 'hn_virtual_con_mortgage')) file_name,  --附件名
                   (hn_report_pkg.get_prj_attachment_id(p_check_id => hvcm.mortgage_id,
                                                  		p_table_name => 'hn_virtual_con_mortgage')) attachment_id,
			       hvcm.mortgage_id
			  from hn_virtual_con_mortgage hvcm
			 where hvcm.mortgage_id = ${@mortgage_id}
				]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter name="mortgage_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
