create_pool_temp.lwm 2 KB
Newer Older
Luochenglong's avatar
Luochenglong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<?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>