筛选出当前操作者所在的一级部门(含其二级部门)的数据范围。
t1.sqrbm='$DepartmentId$' or t1.sqrbm=(select supdepid from hrmdepartment where id = '$DepartmentId$') or t1.sqrbm in (select id from hrmdepartment where supdepid=(select supdepid from hrmdepartment where id = '$DepartmentId$') and supdepid !='')