<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ARCHIVE_POOL_TMP">
    <bm:fields>
        <bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SESSION_ID" prompt="HLS_CCB_MANUAL_DOC_TMP.SESSION_ID"/>
        <bm:field name="document_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOCUMENT_ID" prompt="HLS_CCB_MANUAL_DOC_TMP.DOCUMENT_ID"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
                BEGIN

                    INSERT
                    INTO
                        hls_archive_pool_tmp
                        (
                            session_id,
                            document_id
                        )
                        VALUES
                        (
                            ${/session/@session_id},
                            ${@document_id},
                        );
                    COMMIT;
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
         BEGIN
		    --update by 5390 采用session分批的方式，这里删session需要取整
        	delete hls_archive_pool_tmp where floor(session_id) = ${/session/@session_id};
			commit;
                END;
        ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
         BEGIN

            efile_pool_job_pkg.job_efile_pool_submit(
                                                     ${/session/@session_id},
                                                     ${/session/@user_id},
                                                      ${/session/@company_id});
            END;
        ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
