<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gzj
    $Date: 2022-10-9 14:14:34
    $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 t.* ,
       (SELECT sv.code_value_name
          FROM sys_code_values_v sv
         WHERE sv.code = 'HLS_REPORT_NAME'
           and sv.code_value = t.report_name
           and sv.code_enabled_flag = 'Y') report_name_desc,
           hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
                                            p_source_type    => 'SBO_REPORT',
                                            p_user_id        => 10423) AS sbo_file_name,
           hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
                                            p_source_type    => 'BUSINESS_REPORT',
                                            p_user_id        => 10423) AS business_file_name
  FROM con_monthly_statement t
 where t.monthly_date = ${@month_date}
 and t.batch_number=${@batch_num}
 order by t.tab_id asc

            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                 begin
					con_monthly_statement_pkg.monthly_wfl_start(p_user_id =>${/session/@user_id},
                                                                    p_date    =>${@date});
            	end;
                ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
