<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:fields>
        <bm:field name="fin_statement_templet_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_CODE" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_CODE"/>
        <bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_NAME"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_NAME"/>
        <bm:field name="fiscal_date" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                select  bp_name, fin_statement_templet_code, fin_statement_templet_name
                 , (fiscal_year || '年' || fiscal_month || '月') as fiscal_date from  rsc_fin_statement_prj_hds_v r
            where exists (select 1 from fin_statement_templet_tmp f
                where f.fin_statement_id = r.fin_statement_id
                and f.session_id = ${/session/@session_id})
                    order by fiscal_year desc,fiscal_month desc
            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			
    				delete from fin_statement_templet_tmp  where session_id = ${/session/@session_id}
    			
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
    			
    			  insert into fin_statement_templet_tmp(session_id,fin_statement_id) values(${/session/@session_id},${@fin_statement_id})
    			
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
<!--=======-->
<!--<?xml version="1.0" encoding="UTF-8"?>-->
<!--<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">-->
<!--    <bm:fields>-->
<!--        <bm:field name="fin_statement_templet_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_CODE" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_CODE"/>-->
<!--        <bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_NAME"/>-->
<!--        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_NAME"/>-->
<!--        <bm:field name="fiscal_date" databaseType="VARCHAR2" datatype="java.lang.String"/>-->
<!--    </bm:fields>-->
<!--    <bm:operations>-->
<!--        <bm:operation name="query">-->
<!--            <bm:query-sql><![CDATA[-->
<!--                select  bp_name, fin_statement_templet_code, fin_statement_templet_name-->
<!--                 , (fiscal_year || '年' || fiscal_month || '月') as fiscal_date from  rsc_fin_statement_prj_hds_v r-->
<!--            where exists (select 1 from fin_statement_templet_tmp f-->
<!--                where f.fin_statement_id = r.fin_statement_id-->
<!--                and f.session_id = ${/session/@session_id})-->
<!--                    order by fiscal_year desc,fiscal_month desc-->
<!--            ]]></bm:query-sql>-->
<!--        </bm:operation>-->
<!--        <bm:operation name="delete">-->
<!--            <bm:update-sql><![CDATA[-->
<!--    			-->
<!--    				delete from fin_statement_templet_tmp  where session_id = ${/session/@session_id}-->
<!--    			-->
<!--    		]]></bm:update-sql>-->
<!--        </bm:operation>-->
<!--        <bm:operation name="insert">-->
<!--            <bm:update-sql><![CDATA[-->
<!--    			-->
<!--    			  insert into fin_statement_templet_tmp(session_id,fin_statement_id) values(${/session/@session_id},${@fin_statement_id})-->
<!--    			-->
<!--    		]]></bm:update-sql>-->
<!--        </bm:operation>-->
<!--    </bm:operations>-->
<!--</bm:model>-->
<!--&gt;>>>>>> 32b0a4d... 财报改造20220310批量提交上线-->
