<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-6-20 下午02:43:59  
    $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 t1.contract_id,
               rtrim(to_char(t1.residual_value, 'FM99,999,999,990.99'), '.') residual_value,
               change_number_to_rmb(t1.residual_value) residual_value_upper,
               t1.contract_number,
               '【' || decode(to_char(t1.lease_start_date,'yyyy'),'','         ',to_char(t1.lease_start_date,'yyyy')) || '】' || '年' || '【' ||
               decode(to_char(t1.lease_start_date, 'mm'),'','     ',to_char(t1.lease_start_date, 'mm')) || '】' || '月' || '【' ||
               decode(to_char(t1.lease_start_date, 'dd'),'','     ',to_char(t1.lease_start_date, 'dd')) || '】' || '日' lease_start_date,
               rtrim(to_char(t1.finance_amount, 'FM99,999,999,990.99'), '.') finance_amount,
               change_number_to_rmb(t1.finance_amount) finance_amount_upper,
               t1.int_rate * 100 int_rate,
               t1.annual_pay_times,
               (select v.code_value_name
                  from sys_code_values_v v
                 where v.code = 'HLS500_ANNUAL_PAY_TIMES'
                   and v.code_value = t1.pay_times) annual_pay_times_desc
          from con_contract t1
			 where t1.contract_id=${@contract_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
