<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/09/08 08:48:05 $
    $Revision: 1.1 $
    $Purpose: 工作流定义保存控制文件
-->
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <a:batch-apply sourcepath="/parameter">
            <p:switch test="@current_parameter/@_status">
                <p:case value="insert">
                    <a:model-insert model="tre.tre502.tre_loan_contract"/>
                    <!--保理融资对象-->
                    <a:model-batch-update model="tre.tre503.bgfl_tre_factoring_contract" sourcepath="@current_parameter/factoring_contract_ds" updatePassedFieldOnly="true"/>
                    <!--利率表-->
                    <a:model-batch-update model="tre.tre503.tre_loan_contract_int_rate" sourcepath="@current_parameter/int_rate" updatePassedFieldOnly="true"/>
                    <!-- 提款计划表 -->
                    <a:model-batch-update model="tre.tre503.tre_loan_con_withdrawal_plan" sourcepath="@current_parameter/withdrawal_plan" updatePassedFieldOnly="true"/>
                    <!-- 还款计划表 -->
                    <a:model-batch-update model="tre.tre503.tre_loan_con_repayment_plan" sourcepath="@current_parameter/repayment_plan" updatePassedFieldOnly="true"/>
                    <a:model-batch-update model="tre.tre503.bgfl_tre_loan_con_repayment_plan" sourcepath="@current_parameter/factoring_repayment_plan" updatePassedFieldOnly="true"/>
                    <a:model-batch-update model="tre.tre503.tre_loan_con_fin_con" sourcepath="@current_parameter/fin_con" updatePassedFieldOnly="true"/>
                    <!--附件-->
                    <a:model-batch-update model="tre.tre503.atm_upload_for_loan" sourcepath="@current_parameter/atm_details"/>
                </p:case>
                <p:case value="update">
                    <a:model-update model="tre.tre502.tre_loan_contract"/>
                    <!--保理融资对象-->
                    <a:model-batch-update model="tre.tre503.bgfl_tre_factoring_contract" sourcepath="@current_parameter/factoring_contract_ds" updatePassedFieldOnly="true"/>
                    <!--利率表-->
                    <a:model-batch-update model="tre.tre503.tre_loan_contract_int_rate" sourcepath="@current_parameter/int_rate" updatePassedFieldOnly="true"/>
                    <!-- 提款计划表 -->
                    <a:model-batch-update model="tre.tre503.tre_loan_con_withdrawal_plan" sourcepath="@current_parameter/withdrawal_plan" updatePassedFieldOnly="true"/>
                    <!-- 还款计划表 -->
                    <a:model-batch-update model="tre.tre503.tre_loan_con_repayment_plan" sourcepath="@current_parameter/repayment_plan" updatePassedFieldOnly="true"/>
                    <a:model-batch-update model="tre.tre503.bgfl_tre_loan_con_repayment_plan" sourcepath="@current_parameter/factoring_repayment_plan" updatePassedFieldOnly="true"/>
                    <a:model-batch-update model="tre.tre503.tre_loan_con_fin_con" sourcepath="@current_parameter/fin_con" updatePassedFieldOnly="true"/>
                    <!--附件-->
                    <a:model-batch-update model="tre.tre503.atm_upload_for_loan" sourcepath="@current_parameter/atm_details"/>
                </p:case>
            </p:switch>
            <a:model-update model="tre.tre503.tre_recalculator_repayment_plan"/>
            <a:model-execute model="tre.TRE507.tre_loan_contract_repay_plan_init"/>
            <a:model-execute model="tre.tre503.tre_valid_loan_contract"/>
        </a:batch-apply>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>