diff --git a/src/com/engine/organization/mapper/resource/HrmResourceMapper.java b/src/com/engine/organization/mapper/resource/HrmResourceMapper.java index 274d2ece..2a05da47 100644 --- a/src/com/engine/organization/mapper/resource/HrmResourceMapper.java +++ b/src/com/engine/organization/mapper/resource/HrmResourceMapper.java @@ -73,7 +73,7 @@ public interface HrmResourceMapper { List queryAllResColumns(@Param("level") String level,@Param("grade") String grade); - String queryLabelName(@Param("fieldName") String fieldName); + String queryLabelName(@Param("fieldName") String fieldName,@Param("scopeId") String scopeId); } diff --git a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml index a74ab988..87a46f04 100644 --- a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml +++ b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml @@ -423,6 +423,7 @@ cus_formdict t2 WHERE t1.fieldid = t2.id AND t1.scope = 'HrmCustomFieldByInfoType' + and t1.SCOPEID = #{scopeId} and t2.fieldname = #{fieldName} diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index a74f8d41..a7d32c2f 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -154,9 +154,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic if (StringUtils.isNotBlank(columns)) { String[] tmp = columns.split(","); for (int i = 0; i < tmp.length; i++) { + String scopeId = tmp[i].split("_")[0]; String fieldName = tmp[i].substring(tmp[i].lastIndexOf("_") + 1); WeaTableColumn weaTableColumn = new WeaTableColumn(); - weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName)); + weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId)); weaTableColumn.setColumn(fieldName); weaTableColumn.setDisplay(WeaBoolAttr.TRUE); weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");