<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-11-24 下午04:14:32  
    $Revision: 1.0  
    $Purpose: 保存
-->
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
    <a:init-procedure>
        <s:server-script><![CDATA[
            var _status = $ctx.parameter._status;
            var hd_bm = $bm('cont.CON556.yonda_document_lend_record_hd');
            hd_bm.option = {
                updatePassedFieldOnly: 'true'
            }
            hd_bm[_status]();
        ]]></s:server-script>
        <a:batch-apply sourcepath="/parameter/line_records">
            <p:switch test="@current_parameter/@_status">
                <p:case value="insert">
                    <a:model-insert model="cont.CON556.yonda_document_lend_record_ln"/>
                </p:case>
                <p:case value="update">
                    <a:model-update model="cont.CON556.yonda_document_lend_record_ln"/>
                </p:case>
            </p:switch>
        </a:batch-apply>
        <a:batch-apply sourcepath="/parameter/cdd_records">
            <p:switch test="@current_parameter/@_status">
                <p:case value="insert">
                    <a:model-insert model="cont.CON556.yonda_document_lend_cdd"/>
                </p:case>
                <p:case value="update">
                    <a:model-update model="cont.CON556.yonda_document_lend_cdd"/>
                </p:case>
            </p:switch>
        </a:batch-apply>
        <!--   <a:model-execute model="cont.CON556.yonda_document_lend_record_hd"/> -->
    </a:init-procedure>
    <!-- <a:init-procedure>
        <s:server-script><![CDATA[
        	var m=$ctx.parameter.toXML();
        	println(m);
        ]]></s:server-script>
        <a:batch-apply sourcepath="/parameter">
            <p:switch test="@current_parameter/@_status">
                <p:case value="update">
                    <a:model-update model="cont.CON556.yonda_document_lend_record_hd"/>
                    <a:model-batch-update model="cont.CON556.yonda_document_lend_record_ln" sourcePath="@current_parameter/record_ln"/>
                </p:case>
                <p:case value="insert">
                    <a:model-insert model="cont.CON556.yonda_document_lend_record_hd"/>
                    <a:model-execute model="cont.CON556.yonda_document_lend_record_hd"/>
                    <a:model-batch-update model="cont.CON556.yonda_document_lend_record_ln" sourcePath="@current_parameter/record_ln"/>
                </p:case>
                <p:case value="delete">
                    <a:model-delete model="cont.CON555A.con_express_hd"/>
                    <a:model-delete model="cont.CON556.yonda_document_lend_record_ln"/>
                </p:case>
            </p:switch>
        </a:batch-apply>
    </a:init-procedure> -->
    <a:service-output output="/parameter"/>
</a:service>
