<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wdd  
    $Date: 2018-5-30 下午2:01:51  
    $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
                    TO_CHAR(t.creation_date, 'YYYYMMDD')
                    || '-'
                    ||
                    (SELECT
                        COUNT(DISTINCT(t1.output_id))
                    FROM
                        hls_acr_ebank_output_temp t1
                    WHERE
                        EXISTS
                        (SELECT
                            1
                        FROM
                            hls_acr_ebank_output_temp t2
                        WHERE
                            TO_CHAR(t2.creation_date, 'YYYYMMDD') = TO_CHAR(SYSDATE, 'YYYYMMDD')
                        )
                    ) AS file_name
                FROM
                    hls_acr_ebank_output_temp t
                WHERE
                    t.output_id =${@output_id} AND
                    rownum      = 1
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
