<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: jack  
    $Date: 2014-6-11 下午2:40:59  
    $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 t1.*,rownum from (SELECT a.project_id,
       a.bp_name names,
       '提供连带责任担保' all_type
  FROM prj_project_bp a
    where    a.bp_category = 'GUARANTOR'
       AND a.bp_type = 'GUTA_ORG'
       AND a.bp_class = 'ORG'
UNION
SELECT b.project_id,
       b.bp_name names,
       '提供个人连带责任担保' all_type
  FROM prj_project_act_ctrler_hd b
UNION
SELECT c.project_id,
       d.bp_name names,
       '提供'||c.mortgage_name||'抵押' all_type
  FROM prj_project_mortgage c,
  hls_bp_master d
  where c.bp_id_mortgagor=d.bp_id
) t1 #WHERE_CLAUSE#

]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="project_id" queryExpression="t1.project_id=${@project_id}"/>
    </bm:query-fields>
</bm:model>
