代码bug修改

This commit is contained in:
2023-07-17 09:53:55 +08:00
parent a9fae48c77
commit 9bc32befe6
2 changed files with 7 additions and 3 deletions

View File

@@ -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());
}