---
title: "人力批量多语言转换"
docId: "861915836696281088"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/91f5067f-775e-48f4-93a2-ce84ca0b9c2e/doc/861915836696281088"
---
1. 通用接口
  
  ```java
  com.weaver.common.hrm.util.HrmI18nUtil#batchCovertCommonNameByTableName(java.util.List<T>, int, java.lang.String, com.weaver.common.hrm.domain.multilang.HrmMultiLangType, java.util.function.Function<T,?>, java.util.function.Function<T,?>, java.util.function.BiConsumer<T,U>)
  ```
  
    - langId 人员语言id
    - HrmMultiLangType 多余转换类型
      
      > GROUP_NAME 群组名称GRADE_NAME 职级名称DEPARTMENT_NAME 组织名称（含分部、部门）DEPARTMENT_FULL_NAME 组织全称（含分部、部门）EMPLOYEE_NAME 人员名称POSITION_NAME 岗位名称
      > 
      > JOBTYPE_NAME  职务类型-名称
      > 
      > JOBTYPE_FULL_NAME  职务类型-全称
      > 
      > JOBCALL_NAME  职称
      > 
      > JOBSETLEVEL_NAME 职等
2. 示例

```java
// 转换list中username为多语言
 List<HrmEmployee> list = new ArrayList<>() ;
 HrmI18nUtil.batchCovertCommonNameByTableName(
                list,langId,currentTenantKey,
                HrmMultiLangType.EMPLOYEE_NAME,
                HrmEmployee::getId,
                HrmEmployee::getUsername,
                HrmEmployee::setUsername
        );
```
