<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: weiwuzhen  
    $Date: 2016-5-10 上午10:23:53  
    $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 
             to_char(pbp.prj_bp_id) prj_bp_id,
 pbp.project_id,
 p.year,--年份
 p.capital,--还款来源
 trim(to_char(p.total_repay,'999,999,999,990.99')) total_repay,--当年偿还长期债务本息
 trim(to_char(p.single_repay,'999,999,999,990.99')) single_repay,--其中:我司租金
 trim(to_char(p.repay_cashflow,'999,999,999,990.99')) repay_cashflow,--还款后现金流
 trim(to_char(p.total_cashflow,'999,999,999,990.99')) total_cashflow--累计现金流
 from prj_project_bp_guarantee_lv p ,prj_project_bp  pbp
 where p.prj_bp_id=pbp.prj_bp_id
 and  pbp.bp_category='TENANT'
 AND  pbp.bp_type='TENANT'
  and pbp.project_id=${/parameter/@project_id}
 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
