<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: weiwuzhen  
    $Date: 2016-5-9 上午10:27:35  
    $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 
        avg(pbp.prj_bp_id) prj_bp_id,
       sum(p.equipped_capacitor) sum_equipped_capacitor,--总装机容量(kwp)
       sum(p.forecast_power_generation) sum_power_generation,--总预测发电量(万度)
       trim(to_char(sum(p.forecast_generating_revenue),'999,999,999,990.99')) sum_generating_revenue--总预计发电收入(万元)  
 from prj_project_bp_management_lv p ,prj_project_bp pbp 
 where pbp.prj_bp_id=p.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>
