${IF(fr_authority="SUPERROLE" ||INARRAY("公司高层",fr_authority)>0,"","AND PARENTID IN (SELECT PARENTID FROM IMP_DEPARTMANAGER A LEFT JOIN IMP_ADMIN_DTL B ON A.DEPARTID=B.ADMINID WHERE A.MANAGERID='"+fr_username+"')")} ${if(fr_username="admin" || INARRAY("公司高层",fr_authority)>0,"","AND B.PERSONID IN (SELECT PERSONID FROM DIM_PERSON WHERE INSTR(MANAGERSTR,(SELECT ','||ID||',' FROM DIM_PERSON WHERE PERSONID='"+fr_username+"'),1,1)>0 UNION ALL SELECT PERSONID FROM DIM_PERSON WHERE PERSONID='"+fr_username+"')")} ${IF(LEN(deptId)==0,"","AND A.ADMINIDTREE IN (SELECT DISTINCT T.ADMINIDTREE FROM DIM_ADMIN T WHERE DATAFROM='OA'--OA部门 AND ISCOMPANY='0'--部门 AND ISCANCELED = '0'--未取消 AND COMPANYID IN ('181', '381') START WITH T.ADMINIDTREE IN ('"+deptId+"') CONNECT BY T.FADMINID=PRIOR T.ADMINID)")} ${IF(LEN(DEPT)==0,"","AND A .ADMINIDTREE IN ("+"'"+treelayer(DEPT,true,"\',\'")+"'"+")")} 这三段代码都有什么作用啊,还有("+"'"+treelayer(DEPT,true,"\',\'")+"'"+")")}这是什么意思呀 |