<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF  
    $Date: 2015-1-5 上午10:49:32  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    (SELECT DISTINCT
                        hd.fin_statement_templet_id
                    FROM
                        rsc_fin_statement_prj_hds hd
                    WHERE
                        hd.bp_id = ${@bp_id} AND
                        rownum   = 1
                    ) fin_statement_templet_id,
                    (SELECT COUNT(1) FROM rsc_fin_statement_prj_hds h WHERE h.bp_id = ${@bp_id}
                    ) fin_count
                FROM
                    dual
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
