sql="select a.id,a.lastname as 'name' ,a.jobtitle ,a.belongto ,a.companyworkyear from hrmresource a where a.departmentid = '" +departmentId+"'";
}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+"'";
// 查询部门本身
if(hasVirtualFields){
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{
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,",")+")";
if(showJob){
// 查询部门下的岗位
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);
while(rs.next()){
while(rs.next()){
ChartPOchartPO=newChartPO();
chartPO.setFtype("3");
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 = ?";
}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.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+"'";
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+"'";