根据对象的code进行去重(code为String类型)
orgList = orgList.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<Org>(comparing(Org :: getCode))), ArrayList::new));
如果为code为Long类型
orgList = orgList.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<Org>(comparingLong(Org :: getCode))), ArrayList::new));