<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2015-11-12 下午03:18:57  
    $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 c.contract_id,
         c.contract_number,
         --yonda_to_do_list_pkg.get_insurance_end_date(c.contract_id) insurance_date_to,
         (select m.bp_name from hls_bp_master m where m.bp_id = c.bp_id_tenant) bp_name
    from con_contract c
   where c.contract_status = 'INCEPT'
     and c.data_class = 'NORMAL'
     --and yonda_to_do_list_pkg.insurance_continue_flag(c.contract_id)='Y'
     and ((${/session/@company_id}!=1 and c.spv_company_id=${/session/@company_id} ) or ( ${/session/@company_id}=1))
   ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
