<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:fields>
        <bm:field name="list_count" databaseType="NUMBER" datatype="java.lang.Long"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
             select    (select count(1) as list_count
          from zj_wfl_instance_node_recipient r
         where r.user_id = ${/session/@user_id})
         +
          (select count(1) FROM SDIC_WFL_TO_DO_LIST S1
           where (exists(select 1 from dual where ${/session/@user_id} =s1.user_id)
           or exists(select 1 from dual where ${/session/@role_id} =s1.role_id)
           )
           and s1.DONE_FLAG='N') list_count  from dual
		    ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
