@ -234,7 +234,7 @@ public class ChartServiceImpl extends Service implements ChartService {
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;
}else{
sql="select "+DEPARTMENT_ID+" as id,a.departmentname as name,fleader as bmfzr 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.id = '"+departmentId+"' and versionid = "+versionId;
}
}
rs.executeQuery(sql);
@ -278,38 +278,19 @@ public class ChartServiceImpl extends Service implements ChartService {
// 遍历岗位、查询对应岗位下的人员
if(isRealTime){
if(isRealDimension){
sql="select a.id,a.lastname as name ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? and a.jobtitle = ?";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? and a.jobtitle = ?";
}else{
sql="select a.id,a.lastname as name ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? and a.jobtitle = ?";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? and a.jobtitle = ?";
}
}else{
//if (isRealDimension) {
// sql = "select a.id,a.lastname as name ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? and a.jobtitle = ?";
//} else {
// sql = "select a.id,a.lastname as name ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? and a.jobtitle = ?";
//}
sql="select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear from jcl_chart_resource a where a.status < 4 and a.departmentid = ? and a.jobtitleid = ? and versionid = "+versionId;
sql="select a.id,a.lastname as name ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? ";
if(isRealTime){
if(isRealDimension){
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? ";
}else{
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? ";
}
}else{
sql="select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear from jcl_chart_resource a where a.status < 4 and a.departmentid = ? and versionid = "+versionId;