ListbackList = new ArrayList(); //根据id去重 backList = backList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(DeclareDelivery :: getId))), ArrayList::new));

ListbackList = new ArrayList(); //根据id去重 backList = backList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(DeclareDelivery :: getId))), ArrayList::new));