<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:query-fields><![CDATA[
    ]]></bm:query-fields>
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[  
				BEGIN
					hls_acr_ebanking_new_pkg.run_ebank_output(
				       p_session_id =>${/session/@session_id},
				       p_file_name => ${/parameter/@file_name},
				       p_deadline_date =>to_date(${@deadline_date},'yyyy-mm-dd'),
				        p_deadline_date_to =>to_date(${@deadline_date_to},'yyyy-mm-dd'),
				       p_currency_code =>${@currency_code},
				       p_customer_type =>${@customer_type},
				       p_payment_type =>${@payment_method},
				       p_limit_amount =>${@limit_amount},
				       p_user_id =>${/session/@user_id},
				       p_company_id =>${/session/@company_id},
				       p_customer_id =>${@customer_id},
				       p_contract_number => ${@contract_number},
				       p_period_split_flag	=>	${@generate_rules},
				       p_output_id=>${@output_id},
				       p_times=>${@period_number});
				END;		
			]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="output_id" output="true" outputPath="@output_id"/>
            </bm:parameters>
        </bm:operation>
        <!--  <bm:operation name="query">
            <bm:update-sql><![CDATA[
                SELECT
                    t1.EBANK_TMP_ID,
                    t1.session_id,
                    t1.SEQUENCE_NO,
                    t1.BP_ID_TENANT,
                    t1.DUE_AMOUNT,
                    t1.LIMIT_AMOUNT,
                    t1.BP_NAME,
                    t1.DD_BANK_ACCOUNT_NUM,
                    t1.ID_CARD_NO,
                    t1.PROCESS_RESULT,
                    t1.CONTRACT_NUMBER,
                    t1.TIMES,
                    TO_CHAR(due_date,'yyyy-mm-dd') AS due_date,
                    '农行代扣' AS pay_type,
                    '1' AS transaction_type,
                    '123454322345' AS account_no,
                    '宏菱融资租赁（上海）有限公司' AS account_name,
                    (SELECT
                        dd_bank_branch_name
                    FROM
                        con_contract t
                    WHERE
                        t.data_class         ='NORMAL' AND
                        t.dd_bank_account_num=t1.dd_bank_account_num AND
                        rownum               =1
                    ) AS dd_bank_branch_name,
                    '代收用途' AS usage,
                    '01' AS fen_code,
                    '0' AS curr_flag
                FROM
                    HLS_ACR_EBANK_OUTPUT_TEMP t1
                WHERE
                    t1.due_amount>0 AND
                    t.output_id  =${@output_id}
                ORDER BY
                    SEQUENCE_NO
            ]]></bm:update-sql>
        </bm:operation> -->
    </bm:operations>
    <bm:features/>
</bm:model>
