<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2014-2-10 下午01:07:33  
    $Revision: 1.0  
    $Purpose: 
-->
<a:service xmlns:c="leaf.application.action" xmlns:w="leaf.plugin.export.word" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
    <a:init-procedure participants="leaf.service.exception.ExceptionHandler">
        <a:model-query defaultWhereClause="t1.visit_report_id=${/parameter/@visit_report_id}" fetchAll="true" model="cont.CON801.bgfl_con_visit_report_v" rootPath="visit_report_print"/>
        <a:model-query defaultWhereClause="t1.visit_report_id=${/parameter/@visit_report_id}" fetchAll="true" model="cont.CON801.con_visit_report_lns_t_lv" rootPath="visit_report_t_lns"/>
        <a:model-query defaultWhereClause="t1.visit_report_id=${/parameter/@visit_report_id}" fetchAll="true" model="cont.CON801.con_visit_report_lns_g_lv" rootPath="visit_report_g_lns"/>
        <a:model-query defaultWhereClause="t1.visit_report_id=${/parameter/@visit_report_id}" fetchAll="true" model="cont.CON801.con_visit_report_lns_d_lv" rootPath="visit_report_d_lns"/>
        <w:word-export name="${/parameter/@file_name}" savePath="${/parameter/@file_path}" template="leaf.plugin.export.word/${/parameter/@templt_name}" type="word">
            <w:replaces>
                <w:replace name="bp_name" path="/model/visit_report_print/record/@bp_name"/>
                <w:replace name="unit_name" path="/model/visit_report_print/record/@unit_name"/>
                <w:replace name="employee_manager" path="/model/visit_report_print/record/@employee_manager"/>
                <w:replace name="visit_date" path="/model/visit_report_print/record/@visit_date"/>
                <w:replace name="total_principal" path="/model/visit_report_print/record/@total_principal"/>
                <w:replace name="early_exposure_balance" path="/model/visit_report_print/record/@early_exposure_balance"/>
                <w:replace name="tenant_change" path="/model/visit_report_print/record/@tenant_change"/>
                <w:replace name="contract_number" path="/model/visit_report_print/record/@contract_number"/>
                <w:replace name="checker_name" path="/model/visit_report_print/record/@checker_name"/>
                <w:replace name="default_analysis" path="/model/visit_report_print/record/@default_analysis"/>
                <w:replace name="treatment_measures" path="/model/visit_report_print/record/@treatment_measures"/>
                <w:replace name="result_for_question" path="/model/visit_report_print/record/@result_for_question"/>
                <w:replace name="exist_question" path="/model/visit_report_print/record/@exist_question"/>
                <w:replace name="measure_suggestion" path="/model/visit_report_print/record/@measure_suggestion"/>
                <w:replace name="risk_change" path="/model/visit_report_print/record/@risk_change"/>
                <w:replace name="guarantee_change" path="/model/visit_report_print/record/@guarantee_change"/>
                <w:replace name="tenant_v_amount" path="/model/visit_report_print/record/@tenant_v_amount"/>
                <w:replace name="vemdor_v_amount" path="/model/visit_report_print/record/@vemdor_v_amount"/>
                <w:replace name="object_position" path="/model/visit_report_print/record/@object_position"/>
            </w:replaces>
        </w:word-export>
        <a:model-insert model="prj.PRJ501N.bgfl_generate_word_tmp"/>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>
