freeScopeList().stream().
filter(f -> CollectionUtils.isNotEmpty(f.getFreeScopeFeeList())). //免租范围不能空
filter(f -> CollectionUtils.isNotEmpty(f.getFreePeriodList())). //免租期不能空
collect(Collectors.toList()))
// 集团公司id
List list1 = homeBiCompanyDataList.stream().map(map1 -> map1.getGroupCompanyId()).distinct()
.collect(Collectors.toList());
String spaceFloorName = spaceDtoList.stream().map(m -> m.getBasFloorDto().getFloorName() + “-” + m.getSpaceName()).collect(Collectors.joining(“,”));
// 最新数据的id
List list1 = boList.stream().map(map1 -> map1.getId()).distinct().collect(Collectors.toList());
// 历史数据的id
List list2 = assetList.stream().map(map1 -> map1.getId()).distinct().collect(Collectors.toList());
// 差集 (list2 - list1) 删除
List deleteList = list2.stream().filter(item -> !list1.contains(item)).collect(Collectors.toList());
// 先对名字进行分组,然后按照年龄进行分组
Map
new Person(“张三”, new Date(), 175),
new Person(“李四”, new Date(), 177),
new Person(“张三”, new Date(), 165),
new Person(“李四”, new Date(), 166),
new Person(“张三”, new Date(), 182))
.collect(Collectors.groupingBy(Person::getName, Collectors.groupingBy(Person::getAge)));
map.forEach((k, v) -> System.out.println(“k=” + k + “\t” + “v=” + v));
Map
leaRuleFeeList.stream().collect(Collectors.toMap(LeaContRuleFeeBo::getFeeId, (k) -> k))
decorationFeeList.stream().forEach(fee -> {
fee.setOpenApproveId(openApproveId);
fee.setIsDeleted(IsDelEnum.IS_UN_DEL.getKey());
});