<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: weiwuzhen  
    $Date: 2016-5-22 下午10:01:47  
    $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
                    p.project_id,
                    p.project_name,
                    (sdic_individual_pkg.string_combination('select pp.bp_name ||''(以下简称：''|| pp.extra_nam||'')'' sum_name_tenant                                  
                from prj_project_bp_lv pp                                 
                where  pp.bp_type in (''TENANT'',''FACTORING_BORROWER'')                                   
                and pp.bp_category = ''TENANT''                                   
                and pp.project_id =', p.project_id, '、')) bp_name_tenant,
                    (sdic_individual_pkg.string_combination('select  pp.extra_nam                                  
                from prj_project_bp_lv pp                                 
                where  pp.bp_type in (''TENANT'',''FACTORING_BORROWER'')                                   
                and pp.bp_category = ''TENANT''                                   
                and pp.project_id =', p.project_id, '、')) bp_name_tenant_extra
                FROM
                    prj_project p
                WHERE
                    p.project_id =${/parameter/@project_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
