//去重某一個(gè)字段
List<A>list = list.stream().collect(Collectors.collectingAndThen((Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(a -> a.getLineName())))), ArrayList::new));
//取第一條數(shù)據(jù)
ADto eventDto = aList.stream().findFirst().orElse(null);
//求和(mapToInt)
Integer aa = stockResult.stream().mapToInt(AvailableStockDto::getErpStockQty).sum();
@ApiModelProperty("")
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@FieldDefaults(level = AccessLevel.PRIVATE)