Merge pull request 'feature/cl' (#288) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/288
This commit is contained in:
commit
d77e9d35d4
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -611,9 +611,15 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
Map<String, Object> datas = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
String fclass = Util.null2String(params.get("fclass"));
|
||||
String timeName = Util.null2String(params.get("timeName"));
|
||||
List<TimeLinesBO> timeLinesBOList = new ArrayList<>();
|
||||
timeLinesBOList.add(TimeLinesBO.builder().key(0).id(0).title("当前版本").color("blue").time("").build());
|
||||
rs.executeQuery("SELECT id,recorddate,description from JCL_ORG_CHARTVERSION where fclass = ? and deletetype = ? order by id desc", fclass, 0);
|
||||
String sql = "SELECT id,recorddate,description from JCL_ORG_CHARTVERSION where fclass = ? and deletetype = ?";
|
||||
if (StringUtils.isNotEmpty(timeName)) {
|
||||
sql += " and description like '%"+timeName+"%'";
|
||||
}
|
||||
sql += " order by id desc";
|
||||
rs.executeQuery(sql, fclass, 0);
|
||||
while (rs.next()) {
|
||||
timeLinesBOList.add(TimeLinesBO.builder()
|
||||
.key(rs.getInt("id"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue