<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: sf
    $Date: 2019-10-20 下午03:50:31
    $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 *
  from (select count(*) total_number,
               sum(nvl(v.amount, 0)) sum_amount,
               sum(nvl(v.amount_agent, 0)) sum_amount_agent,
               sum(nvl(v.amount_vender, 0)) sum_amount_vender,
               sum(nvl(v.other_payment2, 0)) sum_other_payment,
               to_char(sysdate, 'yyyy') || '年' || to_char(sysdate, 'mm') || '月' purchase_date
          from csh_payment_req_ln v
           #WHERE_CLAUSE#
          ) v


                ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="v.payment_req_id =${@payment_req_id}"/>
    </bm:data-filters>
  <!--  <bm:query-fields>
        <bm:query-field name="payment_req_id" queryOperator="="/>
    </bm:query-fields>-->

</bm:model>
