String sql = "select createdate from workflow_requestbase where requestid = '"+requestid+"'";
rs.execute(sql);
while (rs.next()){
date = Util.null2String(rs.getString("createdate"));
}
return date;
}
%>
<%!
private String getStaffPlanId(String createdate){
String planid = "";
String sql = "select id,ec_company,control_dimension from jcl_org_staffplan where forbidden_tag = 0 and control_dimension = 2 and time_end >= ? and time_start <= ?";
@ -304,19 +304,19 @@ public class ChartServiceImpl extends Service implements ChartService {
// 遍历岗位、查询对应岗位下的人员
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 = ? and a.jobtitle = ?";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,b.jobtitlename as jobname from hrmresource a where a.status < 4 and a.departmentid = ? and a.jobtitle = ?";
}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 = ? and a.jobtitle = ?";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,b.jobtitlename as jobname from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? and a.jobtitle = ?";
}
}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 a.jobtitleid = ? and versionid = " +versionId;
sql="select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear,a.jobtitle as jobname 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.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? ";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,c.zwmc as jobname \n"+
" from hrmresource a \n"+
" left join cus_fielddata b on a.id = b.id and b.scopeid = +"+scopeid+"\n"+
" left join uf_zwxxjmb c on b."+fieldid+" = c.id\n"+
" 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 = ? ";
sql="select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,d.zwmc as jobname \n"+
" from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid \n"+
" left join cus_fielddata c on a.id = c.id and c.scopeid = +"+scopeid+"\n"+
" left join uf_zwxxjmb d on c."+fieldid+" = d.id\n"+
" 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;
Stringsql="select count(1) as num from hrmresource where STATUS < 4";
if(hasWorkRelation){
intworkRelation=staffPO.getWorkRelation();
sql="select count(1) as num from hrmresource a left join cus_fielddata b on a.id = b.id where status < 4 and b.scope = 'HrmCustomFieldByInfoType' and b.scopeid = 3 ";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.freeze_num,a.lack_status,a.control_policy from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.freeze_num,a.control_policy,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
sql="select id,ec_company,control_dimension from jcl_org_staffplan where forbidden_tag = 0 and control_dimension = 2 and time_end >= ? and time_start <= ?";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 1 and b.forbidden_tag = 0 and a.ec_company = '"+subcomid+"'";
Stringsql="select a.id,a.ec_company,a.ec_department,a.job_id,a.staff_num,a.permanent_num,a.lack_status from jcl_org_staff a left join jcl_org_staffplan b on a.plan_id = b.id where a.delete_type = 0 and b.control_dimension = 2 and b.forbidden_tag = 0 and a.ec_department = '"+deptid+"' and b.time_end >= '"+createdate+"' and b.time_start <= '"+createdate+"'";
Stringsql="select id,ec_company,control_dimension from jcl_org_staffplan where forbidden_tag = 0 and time_end >= '"+date+"' and time_start <= '"+date+"'";
Stringsql="select id,ec_company,control_dimension from jcl_org_staffplan where forbidden_tag = 0 and time_end >= '"+date+"' and time_start <= '"+date+"'";