Map<Object, Boolean> map = new HashMap<>();
dtoList = dtoList.stream().filter(i -> map.putIfAbsent(i.getCompanyName(), Boolean.TRUE) == null).collect(Collectors.toList());
list根据某个属性字段做去重
List<Entity> distinctList = list.stream()
.distinct()
.collect(Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Entity::getProperty))),
ArrayList::new));