feat(techproc): 添加工艺流程创建人显示功能
This commit is contained in:
parent
7459f3766c
commit
114f79f3ad
@ -8,6 +8,8 @@ import jnpf.base.vo.PaginationVO;
|
|||||||
import jnpf.model.techproc.TechProcEntity;
|
import jnpf.model.techproc.TechProcEntity;
|
||||||
import jnpf.model.techproc.TechProcForm;
|
import jnpf.model.techproc.TechProcForm;
|
||||||
import jnpf.model.techproc.TechProcPagination;
|
import jnpf.model.techproc.TechProcPagination;
|
||||||
|
import jnpf.permission.entity.UserEntity;
|
||||||
|
import jnpf.permission.service.UserService;
|
||||||
import jnpf.service.TechProcService;
|
import jnpf.service.TechProcService;
|
||||||
import jnpf.util.JsonUtil;
|
import jnpf.util.JsonUtil;
|
||||||
import jnpf.util.StringUtil;
|
import jnpf.util.StringUtil;
|
||||||
@ -30,6 +32,9 @@ public class TechProcController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TechProcService techProcService;
|
private TechProcService techProcService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
* @param techProcPagination 分页查询对象
|
* @param techProcPagination 分页查询对象
|
||||||
@ -39,6 +44,13 @@ public class TechProcController {
|
|||||||
@PostMapping("/getList")
|
@PostMapping("/getList")
|
||||||
public ActionResult getList(@RequestBody TechProcPagination techProcPagination) {
|
public ActionResult getList(@RequestBody TechProcPagination techProcPagination) {
|
||||||
List<TechProcEntity> list = techProcService.getList(techProcPagination);
|
List<TechProcEntity> list = techProcService.getList(techProcPagination);
|
||||||
|
// 查询创建人
|
||||||
|
list.forEach(item -> {
|
||||||
|
UserEntity userEntity = userService.getById(item.getCreatorUserId());
|
||||||
|
if (userEntity != null) {
|
||||||
|
item.setCreateUserName(userEntity.getRealName());
|
||||||
|
}
|
||||||
|
});
|
||||||
List<Map<String, Object>> realList = list.stream()
|
List<Map<String, Object>> realList = list.stream()
|
||||||
.map(JsonUtil::entityToMap)
|
.map(JsonUtil::entityToMap)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|||||||
@ -54,4 +54,7 @@ public class TechProcEntity {
|
|||||||
|
|
||||||
@TableField(value = "remark", updateStrategy = FieldStrategy.IGNORED)
|
@TableField(value = "remark", updateStrategy = FieldStrategy.IGNORED)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String createUserName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,6 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" align="center"/>
|
<el-table-column prop="remark" label="备注" align="center"/>
|
||||||
|
<el-table-column prop="createUserName" label="创建人" align="center"/>
|
||||||
<el-table-column prop="creatorTime" label="创建时间" align="center" :formatter="jnpf.tableDateFormat1"/>
|
<el-table-column prop="creatorTime" label="创建时间" align="center" :formatter="jnpf.tableDateFormat1"/>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user