sql="select a.id,a.lastname as 'name' ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.departmentid = '" +departmentId+"'";
sql="select a.id,a.departmentname as 'name',b.bmfzr,b.bmlx as 'isvitual' from " +DEPARTMENT_TABLE+" a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '" +departmentId+"'";
}else{
}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 b.departmentid = '" +departmentId+"'";
sql="select a.id,a.departmentname as 'name',b.bmfzr from " +DEPARTMENT_TABLE+" a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '" +departmentId+"'";
sql="select a.id,a.jobtitlename as 'name' from hrmjobtitles a where a.id in(" +StringUtils.join(jobTitleSet,",")+")";
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+"'";
rs.executeQuery(sql);
rs.executeQuery(sql);
while(rs.next()){
while(rs.next()){
ChartPOchartPO=newChartPO();
ChartPOchartPO=newChartPO();
chartPO.setFtype("3");
chartPO.setFtype("3");
chartPO.setFobjid(rs.getString("id"));
chartPO.setFobjid(rs.getString("id"));
@ -237,41 +233,70 @@ public class ChartServiceImpl extends Service implements ChartService {
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 = ?";
if(CollectionUtils.isNotEmpty(chartPOS)){
}else{
dataList.addAll(chartPOS);
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.departmentname as 'name',b.bmfzr,b.bmlx as 'isvitual' from "+DEPARTMENT_TABLE+" a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '"+departmentId+"'";
}else{
}else{
sql="select a.id,a.departmentname as 'name',b.bmfzr from "+DEPARTMENT_TABLE+" a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '"+departmentId+"'";
// 直接查询岗位下的人员
}
sql="select a.id,a.lastname as 'name' ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? ";