<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: jack  
    $Date: 2014-12-4 下午2:11:32  
    $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.price_list,
       t1.validate_sql_1,
       t1.default_value_1,
       t1.default_value_n_1,
       t2.validate_sql_2,
       t2.default_value_2,
       t2.default_value_n_2,
       t3.validate_sql_3,
       t3.default_value_3,
       t3.default_value_n_3
  FROM (SELECT a.price_list,
               yonda_individual_pkg.get_validate_sql(a.price_list,
                                                     a.column_name) validate_sql_1,
               yonda_individual_pkg.get_default_value(a.price_list,
                                                      a.column_name) default_value_1,
               yonda_individual_pkg.get_default_value_n(a.price_list,
                                                        a.column_name) default_value_n_1
          FROM hls_fin_calc_config a
         WHERE a.price_list = ${@price_list}
               AND a.column_name = 'LEASE_TIMES') t1,
       (SELECT a.price_list,
               yonda_individual_pkg.get_validate_sql(a.price_list,
                                                     a.column_name) validate_sql_2,
               yonda_individual_pkg.get_default_value(a.price_list,
                                                      a.column_name) default_value_2,
               yonda_individual_pkg.get_default_value_n(a.price_list,
                                                        a.column_name) default_value_n_2
          FROM hls_fin_calc_config a
         WHERE a.price_list = ${@price_list}
               AND a.column_name = 'ANNUAL_PAY_TIMES') t2,
       (SELECT a.price_list,
               yonda_individual_pkg.get_validate_sql(a.price_list,
                                                     a.column_name) validate_sql_3,
               yonda_individual_pkg.get_default_value(a.price_list,
                                                      a.column_name) default_value_3,
               yonda_individual_pkg.get_default_value_n(a.price_list,
                                                        a.column_name) default_value_n_3
          FROM hls_fin_calc_config a
         WHERE a.price_list = ${@price_list}
               AND a.column_name = 'DOWN_PAYMENT_RATIO') t3
 WHERE t1.price_list = t2.price_list
       AND t1.price_list = t3.price_list
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
