diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index dfbe485f..55b017c7 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -137,7 +137,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic table.setSqlwhere(sqlWhere); List weaTableColumnList = new ArrayList<>(); JclOrgCustomTemplatePO jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryIsusedTemp("1", String.valueOf(user.getUID())); - String columns = null; + String columns = ""; List fields = new ArrayList<>(); List allConditions = getAllConditions(); @@ -638,7 +638,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic DBType dbType = DBType.get(new RecordSet().getDBType()); StringBuilder sb = new StringBuilder(" where 1=1 "); if (params.containsKey("lastName")) { - sb.append(" and t.status = 1"); + // sb.append(" and t.status = 1"); + sb.append(" and t.status < 4"); } for (Map.Entry entry : params.entrySet()) { String key = entry.getKey(); @@ -659,6 +660,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic JobPO jobById = getJobMapper().getJobById(Long.parseLong(value)); if (null != jobById) { sb.append(" and t.jobtitle ='").append(Util.null2String(jobById.getEcJobTitle())).append("' and t.subcompanyid1 = '").append(Util.null2String(jobById.getEcCompany())).append("' and t.departmentId ='").append(Util.null2String(jobById.getEcDepartment())).append("'"); + } else { + sb = new StringBuilder(" where 1 = 2 "); + break; } } @@ -1097,7 +1101,11 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic break; case SELECT://选择框 if (!"-1".equals(value)) { - sb.append(" and ").append(tableSql).append(" = '").append(value).append("' "); + if ("t.status".equalsIgnoreCase(tableSql) && "10".equals(value)) { + sb.append(" and ").append(tableSql).append(" < 4 "); + } else { + sb.append(" and ").append(tableSql).append(" = '").append(value).append("' "); + } } break; case DATE: @@ -1168,15 +1176,15 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic private void addEmptyForSelect(SearchConditionItem searchConditionItem) { searchConditionItem.setValue("-1"); if ("-1_hrm_status".equals(searchConditionItem.getDomkey()[0])) { - searchConditionItem.setValue("1"); + // 默认赋值 在职状态 + searchConditionItem.setValue("10"); } List options = searchConditionItem.getOptions(); SearchConditionOption searchConditionOption = new SearchConditionOption(); searchConditionOption.setKey("-1"); + searchConditionOption.setShowname("全部"); options.add(0, searchConditionOption); - options.forEach(item -> { - item.setSelected(false); - }); + options.forEach(item -> item.setSelected(false)); } /**