@ -61,7 +61,17 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
}
Stringsql="select id, fnumber, fname, ftype from jcl_org_map where ftype in (0, 1) ";
rs.executeQuery(sql+"select id, fnumber, fname, ftype from jcl_org_map where ftype = 0 and fdateend > "+DBType.get(newRecordSet().getDBType()).currentDate()+" order by ftype , id,fdateend desc ");
whereSql+=" and t.fparentid = "+id.split("_")[0]+" and ((t.ftype =1 and t.fobjid in("+detachUtil.getJclRoleLevels()+")) or (t.ftype =2 ) or (t.ftype = 3 ))";
}
}
}else{
if(StringUtils.isNotBlank(deptLeader)){
deptLeader=deptLeader.split(",")[0];
whereSql+=" and t.ftype = 3 and fobjid = '"+deptLeader+"' ";
@ -327,7 +349,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
whereSql+=" and t.fparentid = "+id.split("_")[0];
}
}
}
rs.executeQuery(sql+whereSql);
while(rs.next()){
Map<String,Object>item=newHashMap<>();
@ -438,7 +460,20 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
}
}
DetachUtildetachUtil=newDetachUtil(user);
if(detachUtil.isDETACH()){
if("0".equals(id)){
sql+=" and t.ftype = 1 and t.fparentid = "+id+" and t.fobjid in("+detachUtil.getJclRoleLevels()+")";
}else{
if(StringUtils.isNotBlank(deptLeader)){
deptLeader=deptLeader.split(",")[0];
sql+=" and t.ftype = 3 and fobjid = '"+deptLeader+"' ";