|
|
|
@ -63,6 +63,8 @@ import weaver.general.BaseBean;
|
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
|
import weaver.general.TimeUtil;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.company.DepartmentComInfo;
|
|
|
|
|
import weaver.hrm.company.SubCompanyComInfo;
|
|
|
|
|
import weaver.hrm.definedfield.HrmFieldManager;
|
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
|
|
|
|
|
@ -786,9 +788,14 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, conditionItems);
|
|
|
|
|
Map<String, SearchConditionItem> allFieldsMap = conditionItems.stream().collect(Collectors.toMap(item -> item.getDomkey()[0], item -> item, (k1, k2) -> k1));
|
|
|
|
|
boolean isQuickSearch = "true".equals(Util.null2String(params.get("isQuickSearch")));
|
|
|
|
|
DepartmentComInfo deptInfo = new DepartmentComInfo();
|
|
|
|
|
SubCompanyComInfo subInfo = new SubCompanyComInfo();
|
|
|
|
|
|
|
|
|
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
|
|
|
|
StringBuilder sb = new StringBuilder(" where 1=1 ");
|
|
|
|
|
// 默认去除外部人员显示
|
|
|
|
|
sb.append( " and t.seclevel >= 0 ");
|
|
|
|
|
|
|
|
|
|
if (params.containsKey("lastName") || !params.containsKey("-1_hrm_status")) {
|
|
|
|
|
// sb.append(" and t.status = 1");
|
|
|
|
|
sb.append(" and t.status < 4");
|
|
|
|
@ -810,10 +817,18 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
sb.append(" and t.lastname ").append(dbType.like(value));
|
|
|
|
|
}
|
|
|
|
|
if ("companyId".equals(key)) {
|
|
|
|
|
sb.append(" and t.subcompanyid1 ='").append(value).append("'");
|
|
|
|
|
ArrayList<Integer> list = new ArrayList<>();
|
|
|
|
|
list.add(Integer.parseInt(value));
|
|
|
|
|
subInfo.getSubCompanyLists(value,list);
|
|
|
|
|
String allSub = StringUtils.join(list,",");
|
|
|
|
|
sb.append(" and t.subcompanyid1 in(").append(allSub).append(")");
|
|
|
|
|
}
|
|
|
|
|
if ("departmentId".equals(key)) {
|
|
|
|
|
sb.append(" and t.departmentId ='").append(value).append("'");
|
|
|
|
|
ArrayList<Integer> list = new ArrayList<>();
|
|
|
|
|
list.add(Integer.parseInt(value));
|
|
|
|
|
deptInfo.getAllChildDeptByDepId(list,value);
|
|
|
|
|
String allDept = StringUtils.join(list,",");
|
|
|
|
|
sb.append(" and t.departmentId in (").append(allDept).append(")");
|
|
|
|
|
}
|
|
|
|
|
if ("jobTitle".equals(key)) {
|
|
|
|
|
JobPO jobById = getJobMapper().getJobById(Long.parseLong(value));
|
|
|
|
|