根据faid属性分组
List jjhzTlYaVoList = new ArrayList<>();
jjhzTlYaVoList =jjhzTlYaVoList1.stream().collect(collectingAndThen(
toCollection(
() -> new TreeSet<>(Comparator.comparing(JjhzTlYaVo::getFaid))
),
ArrayList::new
));
Set subJgIdSet = allSubSysZcjgList.stream().map(SysZcjg::getId).collect(Collectors.toSet());
List jgbidList = cyglYbjgList.stream().map(o -> o.getId()).distinct().collect(Collectors.toList());
注意方式,忽略细节
List jjhzTlYaVoList = new ArrayList<>();
List qyjxKhfaJbxxList = new ArrayList<>();
qyjxKhfaJbxxList=jjhzTlYaVoList.stream().map(k -> {
QyjxKhfaJbxx qyjxKhfaJbxx = new QyjxKhfaJbxx();
qyjxKhfaJbxx.setId(k.getFaid());
qyjxKhfaJbxx.setFamc(k.getFamc());
return qyjxKhfaJbxx;
}).collect(Collectors.toList());
Map
List tmpYbjgHcxqList = cyglYbjgHcxqList.stream().filter(o -> o.getJgbid().equals(cyglYbjg.getId())).collect(Collectors.toList());
QyjxZbfl exsitQyjxZbfl = qyjxZbflList.stream().filter(o -> {
if (fldj == 1) {
return flmc.equals(o.getFlmc());
} else {
return fldj == o.getFldj() && flmc.equals(o.getFlmc()) && parentFlid.equals(o.getFid());
}
}).findFirst().orElse(null);
Map
BigDecimal jggfALl = khdxlist.stream().map(JjhzTlYaVo::getGzzdl).reduce(BigDecimal.ZERO, BigDecimal::add);
1、 cyglHcpdtjXmList = cyglHcpdtjXmList.stream().sorted(Comparator.comparing(QyjxCyglHcpdtjXm::getXmsx)).collect(Collectors.toList());
2、 this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList());
jZbVoList = tjZbVoList.stream().sorted(new Comparator() {
@Override
public int compare(QyjxFakZbszTjZbVo o1, QyjxFakZbszTjZbVo o2) {
return Double.compare(o2.getTjScore(), o1.getTjScore());
}
}).collect(Collectors.toList());