From 9dbce1e8c537417b7917033ebe58ba8e2086a1c8 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 10 Jan 2023 14:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E6=90=9C=E7=B4=A2BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/HrmResourceServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index 48f825ce..d70245ea 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -628,7 +628,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic HrmFieldManager hfm = new HrmFieldManager("HrmCustomFieldByInfoType", scopeid); List conditionItems = new ArrayList<>(); - for (String fieldName : fieldNames) { + for (String field : fieldNames) { + String fieldName = field.substring(field.lastIndexOf("_") + 1); JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName); if (null == hrmFieldConf) { continue; @@ -674,11 +675,11 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic List workFields = new ArrayList<>(); for (String fieldName : split) { if (fieldName.startsWith(HrmGroupEnum.HRM_BASIC.getGroupType().toString())) { - basicFields.add(fieldName.substring(fieldName.lastIndexOf("_") + 1)); + basicFields.add(fieldName); } else if (fieldName.startsWith(HrmGroupEnum.HRM_PERSONAL.getGroupType().toString())) { - personalFields.add(fieldName.substring(fieldName.lastIndexOf("_") + 1)); + personalFields.add(fieldName); } else if (fieldName.startsWith(HrmGroupEnum.HRM_WORK.getGroupType().toString())) { - workFields.add(fieldName.substring(fieldName.lastIndexOf("_") + 1)); + workFields.add(fieldName); } } return SearchTemplatePO.builder().basicFields(StringUtils.join(basicFields, ",")).personalFields(StringUtils.join(personalFields, ",")).workFields(StringUtils.join(workFields, ",")).build();