From f8b60493f8a468daa531c86eba55364b4a190e08 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 1 Mar 2023 16:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/HrmResourceServiceImpl.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) 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)); } /**