职级列表 职等信息展示

This commit is contained in:
dxfeng 2022-05-12 14:27:10 +08:00
parent c445185f0d
commit 23944db568
2 changed files with 29 additions and 7 deletions

View File

@ -24,9 +24,9 @@ import lombok.NoArgsConstructor;
" t.grade_name ," +
" t.description ," +
" a.scheme_name ," +
" b.level_name ," +
" t.level_id ," +
" t.forbidden_tag",
fromSql = "from jcl_org_grade t inner join jcl_org_scheme a on t.scheme_id = a.id inner join jcl_org_level b on t.level_id = b.id ",
fromSql = "from jcl_org_grade t inner join jcl_org_scheme a on t.scheme_id = a.id ",
orderby = "id desc",
primarykey = "id",
operates = {
@ -67,12 +67,9 @@ public class GradeTableVO {
/**
* 职等
*/
@OrganizationTableColumn(text = "职等", width = "20%", column = "level_id",transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
private String levelId;
/**
* 职等
*/
@OrganizationTableColumn(text = "职等", width = "20%", column = "level_name")
private String levelName;
/**
* 禁用标记
*/

View File

@ -0,0 +1,25 @@
package com.engine.organization.transmethod;
import com.engine.organization.entity.QueryParam;
import com.engine.organization.mapper.scheme.LevelMapper;
import com.engine.organization.util.db.MapperProxyFactory;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/12
* @version: 1.0
*/
public class LevelTransMethod {
public static String getLevelId(String levelId) {
LevelMapper levelMapper = MapperProxyFactory.getProxy(LevelMapper.class);
List<Map<String, Object>> maps = levelMapper.listLevelsByIds(QueryParam.builder().ids(levelId).build().getIds());
String levelName = maps.stream().map(item -> (String) item.get("name")).collect(Collectors.joining(","));
return levelName;
}
}