List<JSONObject>empInfo=orgService.select(String.format("select t1.ORGLEVEL,t2.DEPTLEVEL from ibzemp t left join ibzorg t1 on t.orgid =t1.orgid left join ibzdept t2 on t.MDEPTID=t2.DEPTID where t.LOGINNAME='%s' ",loginName));
if(empInfo.size()==0)
returnnull;
orgLevel=empInfo.get(0).getString("ORGLEVEL");
deptLevel=empInfo.get(0).getString("DEPTLEVEL");
//通过levelCode查询上下级组织信息
List<JSONObject>pOrgLists=orgService.select(String.format("select orgid from ibzorg t where INSTR('%s', t.orglevel )=1 ",orgLevel));
List<JSONObject>sOrgLists=orgService.select(String.format("select orgid from ibzorg t where INSTR(t.orglevel ,'%s' )=1 ",orgLevel));
List<JSONObject>pOrgDeptLists=orgService.select(String.format("select deptid from ibzdept t where INSTR(t.deptlevel ,'%s')=1 ",deptLevel));
List<JSONObject>sOrgDeptLists=orgService.select(String.format("select deptid from ibzdept t where INSTR('%s',t.deptlevel )=1 ",deptLevel));