上海汽车芯片工程中心
This commit is contained in:
parent
035ae80970
commit
3fd94af396
|
|
@ -762,6 +762,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成人数
|
* 生成人数
|
||||||
|
* 二开需求(在职人数统计去除临时状态)
|
||||||
* @param stp
|
* @param stp
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -777,7 +778,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(stp.getType())) {
|
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(stp.getType())) {
|
||||||
subCompany.getSubCompanyLists(String.valueOf(stp.getDataId()), list);
|
subCompany.getSubCompanyLists(String.valueOf(stp.getDataId()), list);
|
||||||
String value = StringUtils.join(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" +
|
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" +
|
" on a.plan_id = b.id\n" +
|
||||||
" and a.ec_company = ? and a.ec_department is null and a.delete_type = 0\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 {
|
}else {
|
||||||
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
|
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
|
||||||
String value = StringUtils.join(list,",");
|
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" +
|
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" +
|
" on a.plan_id = b.id\n" +
|
||||||
" and a.ec_department = ? and a.job_id is null and a.delete_type = 0\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> hisCompanyList = new ArrayList<>();
|
||||||
List<Integer> hisDepartmentList = 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()) {
|
while (rs.next()) {
|
||||||
hisCompanyList.add(Util.getIntValue(rs.getString("data_id")));
|
hisCompanyList.add(Util.getIntValue(rs.getString("data_id")));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -493,7 +493,7 @@ public class StaffServiceImpl extends Service implements StaffService {
|
||||||
boolean hasDepartment = null != staffPO.getEcDepartment() && 0 != staffPO.getEcDepartment();
|
boolean hasDepartment = null != staffPO.getEcDepartment() && 0 != staffPO.getEcDepartment();
|
||||||
boolean hasJob = null != staffPO.getJobId() && 0 != staffPO.getJobId();
|
boolean hasJob = null != staffPO.getJobId() && 0 != staffPO.getJobId();
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
String sql = "select count(1) as num from hrmresource where STATUS < 4";
|
String sql = "select count(1) as num from hrmresource where STATUS in (0,1,3)";
|
||||||
if (null != staffPO.getEcCompany() && 0 != staffPO.getEcCompany()) {
|
if (null != staffPO.getEcCompany() && 0 != staffPO.getEcCompany()) {
|
||||||
ArrayList<String> subCompanyList = new ArrayList<>();
|
ArrayList<String> subCompanyList = new ArrayList<>();
|
||||||
subCompanyList.add(staffPO.getEcCompany().toString());
|
subCompanyList.add(staffPO.getEcCompany().toString());
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public class StaffPersonCron extends BaseCronJob {
|
||||||
List<StaffPO> poList = new ArrayList<>();
|
List<StaffPO> poList = new ArrayList<>();
|
||||||
cronParamList.forEach(item -> {
|
cronParamList.forEach(item -> {
|
||||||
|
|
||||||
String sql = "select count(1) as num from hrmresource where status < 4";
|
String sql = "select count(1) as num from hrmresource where status in (0,1,3)";
|
||||||
if ("1".equals(item.getControlDimension())){
|
if ("1".equals(item.getControlDimension())){
|
||||||
ArrayList<String> subCompanyList = new ArrayList<>();
|
ArrayList<String> subCompanyList = new ArrayList<>();
|
||||||
subCompanyList.add(item.getEcCompany().toString());
|
subCompanyList.add(item.getEcCompany().toString());
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,9 @@ public class StatisticsPersonCron extends BaseCronJob {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
Integer value = StringUtils.isNotBlank(companyId) ? Integer.parseInt(companyId) : null;
|
Integer value = StringUtils.isNotBlank(companyId) ? Integer.parseInt(companyId) : null;
|
||||||
StatisticsParam build = StatisticsParam.builder().companyId(value).build();
|
|
||||||
|
//数据过滤去除可手动选择 ()
|
||||||
|
StatisticsParam build = StatisticsParam.builder().companyId(null).build();
|
||||||
User user = new User();
|
User user = new User();
|
||||||
user.setUid(1);
|
user.setUid(1);
|
||||||
getChartService(user).recordStatistics(build);
|
getChartService(user).recordStatistics(build);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue