1.收集对象属性
List ids = dataList.stream().map(TradeSalesExwarehouseInfoForRailwayVo::getRelatedDocId).collect(Collectors.toList());
2.对象属性分组
Map<String, List<TradeExwarehouseBatchInfoDto>> groupBy = batchInfoDtos.stream().collect(Collectors.groupingBy(TradeExwarehouseBatchInfoDto::getExwarehouseNo));