<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-7-24 下午7:34:44  
    $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 nvl(DECODE(${/parameter/@fin_statement_templet_id},
              '',
              (SELECT r.FIN_STATEMENT_TEMPLET_ID
                 FROM RSC_FIN_STATEMENT_PRJ_HDS r
                WHERE r.bp_id = ${/parameter/@bp_id}
                  AND rownum = 1),
              ${/parameter/@fin_statement_templet_id}),-100) fin_statement_templet_id
  from dual]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="fin_statement_templet_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_TEMPLET_ID"/>
    </bm:fields>
</bm:model>
