java List 根据多个字段联合进行去重
List<InvoiceWsDto> duplicatvo = new ArrayList();
List<InvoiceWsDto> distinctClass = duplicatvo.stream().collect(
Collectors.collectingAndThen(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(o -> o.getFpdm() + o.getFphm()))), ArrayList::new));
for (InvoiceWsDto wsDto: distinctClass) {
System.out.print("Fpdm:" + wsDto.getFpdm() + " ");
System.out.print("Fphm:" + wsDto.getFphm() + " ");
System.out.print("Fpje:" + wsDto.getFpje() + " ");
System.out.println();
}