@ -238,9 +235,9 @@ public class ChartServiceImpl extends Service implements ChartService {
}
}else{
if(hasVirtualFields){
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,fleader as bmfzr,isvirtual as isvitual from "+DEPARTMENT_TABLE+" a where a.id = '" +departmentId+"' and versionid = "+versionId;
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,fleader as bmfzr,isvirtual as isvitual from "+DEPARTMENT_TABLE+" a where a." +DEPARTMENT_ID+" = '" +departmentId+"' and versionid = "+versionId;
}else{
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name from "+DEPARTMENT_TABLE+" a where a.id = '" +departmentId+"' and versionid = "+versionId;
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name from "+DEPARTMENT_TABLE+" a where a." +DEPARTMENT_ID+" = '" +departmentId+"' and versionid = "+versionId;
}
}
rs.executeQuery(sql);
@ -386,7 +383,7 @@ public class ChartServiceImpl extends Service implements ChartService {
return"select id,companyname as name,'0' as type from "+COMPANY_TABLE;
}else{
//查询其他维度集团版本信息
return"select id,companyname as name,'0' as type from " +COMPANY_TABLE+" where "+
return"select companyvirtualid as id,companyname as name,'0' as type from " +COMPANY_TABLE+" where "+
" versionid = "+versionId+" and companyvirtualid = "+dimension;
}
}else{
@ -560,16 +557,16 @@ public class ChartServiceImpl extends Service implements ChartService {
insertData(insertDeptSql,insertParamList);
//当前岗位版本存储
rs.executeQuery("select a.id as jobid,a.job_name as jobname,a.ec_department as departmentid," +
rs.executeQuery("select b.id as jobid,b.JOBTITLENAME as jobname,a.ec_department as departmentid," +
"c.departmentname as department,a.ec_company as subcompanyid,d.subcompanyname as subcompany,"+
"b.jobresponsibility,a.forbidden_tag as canceled,a.job_no as jobcode,a.description "+
"from jcl_org_job a left join hrmjobtitles b on a.ec_jobtitle = b.id " +
"from jcl_org_job a inner join hrmjobtitles b on a.ec_jobtitle = b.id " +
"left join hrmdepartment c on a.ec_department=c.id "+
"left join hrmsubcompany d on a.ec_company=d.id");
@ -911,7 +909,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 (canceled is null or canceled != '1') and supsubcompanyid = '"+fObjId+"' and versionid = "+versionId+
" union 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 is null or supdepartmentid = '0') and subcompanyid = '" +fObjId+"' and versionid = "+versionId;
" union select "+DEPARTMENT_ID+" as 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 subcompanyid = '" +fObjId+"' and versionid = "+versionId;
}
break;
case"2":
@ -922,7 +920,7 @@ public class ChartServiceImpl extends Service implements ChartService {
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;
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 supdepid = '" +fObjId+"' and versionid = "+versionId;
@ -86,7 +86,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '0'";
companyTree.add(CompanyTreePO.builder().id(rs.getString("id")).pId(rs.getString("pId")).value(rs.getString("value")).title(rs.getString("title")).isLeaf(judgeTreeLeaf("select id from hrmsubcompany where (canceled is null or canceled != '1') and supsubcomid = ?",rs.getString("id"))).build());
}
result.put("api_status",true);
result.put("fclasslist",fclasslist);
@ -111,21 +111,21 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '" +subcompany+"'";
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = ? ";
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '" +subcompany+"' and companyid = '" +fclass+"'";
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = ? and companyid = '" +fclass+"'";
}
}else{
sql="select id as id, id as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompany where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcompanyid","0")+" = '" +subcompany+"'";
sql="select subcompanyid as id, id as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompany where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcompanyid","0")+" = ? ";
sql="select id as id, id as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompanyvirtual where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcompanyid","0")+" = '" +subcompany+"' and companyid = '" +fclass+"'";
sql="select subcompanyvirtualid as id, id as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompanyvirtual where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcompanyid","0")+" = ? and companyid = '" +fclass+"'";