select id from sys_dep where id in ("+dept+") and (select aa.* from (select t.cydw from pjcydw t where pjid='"+pjid+"' order by time desc) aa "+ "where rownum=1) like '%'||id||'%