get_lease_item.lwm 2.25 KB
Newer Older
Spencer Chang's avatar
Spencer Chang 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 53
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: mumu  
    $Date: 2014-7-19 下午11:30:38  
    $Revision: 1.0  
    $Purpose: 获取主车挂车相关信息
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            SELECT t.*,decode(t.packet_number,1,'主车','挂车') car_type,
            t.contract_lease_item_id,
            t.engine,-- 发动机
            t.ref_v03,--车架号
            (SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = main_ins_company) main_ins_company_n,
            (SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = slave_ins_company) slave_ins_company_n,
            to_char(t.insurance_start_date,'yyyy-mm-dd') insurance_start_date_n FROM con_contract_lease_item t
				where t.contract_id = ${@contract_id} and t.packet_number = ${@packet_number}]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter name="contract_id"/>
                <bm:parameter name="packet_number"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
        		begin
				  -- Call the procedure
				  con_contract_lease_item_pkg.cfl_update_item(p_contract_lease_item_id => ${@contract_lease_item_id},
				                                              p_engine => ${@engine},
				                                              p_ref_v03 => ${@ref_v03},
				                                              p_user_id => ${/session/@user_id});
				end;
        	]]></bm:update-sql>
            <!-- <bm:parameters>
                <bm:parameter name="contract_lease_item_id"/>
            </bm:parameters> -->
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_id"/>
        <bm:field name="contract_lease_item_id"/>
        <bm:field name="packet_number"/>
        <bm:field name="car_type"/>
        <bm:field name="policy_number"/>
        <bm:field name="main_ins_company_n"/>
        <bm:field name="slave_ins_company_n"/>
        <bm:field name="insurance_payment_status"/>
        <bm:field name="insurance_start_date_n"/>
        <bm:field name="engine"/>
        <bm:field name="ref_v03"/>
    </bm:fields>
</bm:model>