代码bug修改
This commit is contained in:
@@ -157,6 +157,8 @@ public class SupvPlanVO {
|
||||
|
||||
private String createBy;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 实施状态
|
||||
*/
|
||||
@@ -164,4 +166,6 @@ public class SupvPlanVO {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
|
||||
Page<SupvPlan> page = this.page(new Page<>(PageFactory.getPageNum(supvPlanParam), PageFactory.getPageSize(supvPlanParam)), lambdaQueryWrapper);
|
||||
List<SupvPlanVO> supvPlanVOList = BeanUtil.copyToList(page.getRecords(), SupvPlanVO.class);
|
||||
List<String> userIds = supvPlanVOList.stream().map(SupvPlanVO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
List<String> userIds = supvPlanVOList.stream().map(SupvPlanVO::getUpdateBy).distinct().collect(Collectors.toList());
|
||||
supvPlanVOList.forEach(item -> {
|
||||
PvTerminalTreeVO pvTerminalTreeVO = null;
|
||||
if (mapCode.containsKey(item.getSupvOrgId())) {
|
||||
@@ -231,8 +231,8 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
List<User> userList = userFeignClient.getUserByIdList(userIds).getData();
|
||||
Map<String, User> map = userList.stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
||||
|
||||
if (map.containsKey(item.getCreateBy())) {
|
||||
item.setCreateBy(map.get(item.getCreateBy()).getName());
|
||||
if (map.containsKey(item.getUpdateBy())) {
|
||||
item.setCreateBy(map.get(item.getUpdateBy()).getName());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user