<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: syj  
    $Date: 2015年7月16日10:47:10
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
               SELECT *
				  FROM (SELECT m.contact_person,
				               m.position,
				               (SELECT v.code_value_name
				                  FROM sys_code_values_v v
				                 WHERE v.code = 'HLS211_POSITION'
				                   AND v.code_value = m.position) position_n,
				               m.working_years,
				               m.cell_phone,
				               m.bp_id,
				               b.chance_id
				          FROM hls_bp_master_contact_info m, prj_chance_bp b
				         WHERE b.bp_id = m.bp_id) t 
				   #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="chance_id" queryExpression="t.chance_id=${@chance_id}"/>
    </bm:query-fields>
</bm:model>
