<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: weiwuzhen  
    $Date: 2016-7-13 下午1:48:40  
    $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 ''||'附件'|| change_number_to_cn(RANK()
                           OVER(ORDER BY CI.ORDER_SEQ, ci.cdd_item_id)) rk,
       ci.description, --文档名称
       hd.payment_req_id
  from prj_cdd_item              ci,
       prj_cdd_item_list_grp_tab lgt,
       prj_cdd_item_tab_group    tg,
       csh_payment_req_hd        hd
 where hd.cdd_list_id = ci.cdd_list_id
   and ci.cdd_item_id = lgt.cdd_item_id
   and tg.tab_group_id(+) = lgt.tab_group_id
   and tg.tab_group = 'CSH_PAYMENT_DOC'
   and ci.sys_flag = 'N'
   and hd.payment_req_id = ${/parameter/@payment_req_id}
   ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
