@ -146,28 +146,17 @@ public class ChartServiceImpl extends Service implements ChartService {
if(s.contains("_")){
StringfObjId=s.split("_")[1];
if(s.startsWith("s")){
if(hasVirtualFields){
if(showVirtual){
rs.executeQuery("select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from "+SUB_COMPANY_TABLE+" a left join "+SUB_COMPANY_DEFINED_TABLE+" b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and a.supsubcomid = '"+fObjId+"'"+
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual from "+DEPARTMENT_TABLE+" a left join "+DEPARTMENT_DEFINED_TABLE+" b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and subcompanyid1 = '"+fObjId+"'");
}else{
rs.executeQuery("select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from "+SUB_COMPANY_TABLE+" a left join "+SUB_COMPANY_DEFINED_TABLE+" b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and (b.fblx is null or b.fblx != '1') and a.supsubcomid = '"+fObjId+"'"+
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual from "+DEPARTMENT_TABLE+" a left join "+DEPARTMENT_DEFINED_TABLE+" b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and (b.bmlx is null or b.bmlx != '1') and subcompanyid1 = '"+fObjId+"'");
rs.executeQuery("select a.id,a.subcompanyname as name,'1' as type from "+SUB_COMPANY_TABLE+" a where (canceled is null or canceled != '1') and supsubcomid = '"+fObjId+"'"+
" union select a.id,a.departmentname as name,'2' as type from "+DEPARTMENT_TABLE+" a where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid1 = '"+fObjId+"'");
rs.executeQuery("select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual from "+DEPARTMENT_TABLE+" a left join "+DEPARTMENT_DEFINED_TABLE+" b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and supdepid = '"+fObjId+"'");
}else{
rs.executeQuery("select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual from "+DEPARTMENT_TABLE+" a left join hrmdepartmentdefined b on a.id = b.deptid where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and a.supdepid = '"+fObjId+"'");
rs.executeQuery("select a.id,a.departmentname as name,'2' as type from "+DEPARTMENT_TABLE+" a where (canceled is null or canceled != '1') and supdepid = '"+fObjId+"'");
@ -257,7 +246,7 @@ public class ChartServiceImpl extends Service implements ChartService {
// 查询部门下的岗位
if(isRealTime){
sql="select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle where b.ec_department = '"+departmentId+"'";
}else{
}else{
sql="select jobid as id ,jobname as name from jcl_chart_job where departmentid = '"+departmentId+"' and versionid = "+versionId;
}
rs.executeQuery(sql);
@ -501,7 +490,7 @@ public class ChartServiceImpl extends Service implements ChartService {
}else{
sql="select "+SUB_COMPANY_ID+" as id,a.subcompanyname as name,'1' as type from "+SUB_COMPANY_TABLE+" a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and versionid = "+versionId;
}
if(!isRealDimension){
if(!isRealDimension){
sql+=" and companyid = "+fObjId;
}
break;
@ -524,7 +513,7 @@ public class ChartServiceImpl extends Service implements ChartService {
if(showVirtual){
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,'2' as type ,isvirtual as isvitual from "+DEPARTMENT_TABLE+" a where (a.canceled is null or a.canceled != '1') and supdepartmentid = '"+fObjId+"' and versionid = "+versionId;
}else{
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,'2' as type ,isvirtual as isvitual from "+DEPARTMENT_TABLE+" where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supdepartmentid = '" +fObjId+"' and versionid = "+versionId;
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,'2' as type ,isvirtual as isvitual from "+DEPARTMENT_TABLE+" a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supdepartmentid = '" +fObjId+"' and versionid = "+versionId;
}
}else{
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,'2' as type from "+DEPARTMENT_TABLE+" a where (canceled is null or canceled != '1') and supdepartmentid = '"+fObjId+"' and versionid = "+versionId;
@ -544,14 +533,14 @@ public class ChartServiceImpl extends Service implements ChartService {