|
|
|
@ -762,6 +762,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生成人数
|
|
|
|
|
* 二开需求(在职人数统计去除临时状态)
|
|
|
|
|
* @param stp
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -777,7 +778,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(stp.getType())) {
|
|
|
|
|
subCompany.getSubCompanyLists(String.valueOf(stp.getDataId()), list);
|
|
|
|
|
String value = StringUtils.join(list,",");
|
|
|
|
|
jobSql.append("select count(1) as count from hrmresource where status < 4 and subcompanyid1 in (").append(value).append(")");
|
|
|
|
|
jobSql.append("select count(1) as count from hrmresource where status in (0,1,3) and subcompanyid1 in (").append(value).append(")");
|
|
|
|
|
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
|
|
|
|
|
" on a.plan_id = b.id\n" +
|
|
|
|
|
" and a.ec_company = ? and a.ec_department is null and a.delete_type = 0\n" +
|
|
|
|
@ -785,7 +786,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
}else {
|
|
|
|
|
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
|
|
|
|
|
String value = StringUtils.join(list,",");
|
|
|
|
|
jobSql.append("select count(1) as count from hrmresource where status < 4 and departmentid in (").append(value).append(")");
|
|
|
|
|
jobSql.append("select count(1) as count from hrmresource where status in (0,1,3) and departmentid in (").append(value).append(")");
|
|
|
|
|
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
|
|
|
|
|
" on a.plan_id = b.id\n" +
|
|
|
|
|
" and a.ec_department = ? and a.job_id is null and a.delete_type = 0\n" +
|
|
|
|
@ -831,7 +832,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
List<Integer> hisCompanyList = new ArrayList<>();
|
|
|
|
|
List<Integer> hisDepartmentList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
rs.executeQuery("select data_id from jcl_org_onjob where type = 1");
|
|
|
|
|
StringBuilder companySql = new StringBuilder("select data_id from jcl_org_onjob where type = 1");
|
|
|
|
|
|
|
|
|
|
if (companyId != null) {
|
|
|
|
|
companySql.append(" and data_id = ").append(companyId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rs.executeQuery(companySql.toString());
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
hisCompanyList.add(Util.getIntValue(rs.getString("data_id")));
|
|
|
|
|
}
|
|
|
|
|