java的list的distinct countint[] arr= settingRateBOList.stream().mapToInt(value -> value.getProductFormCode()).toArray(); long count = Arrays.stream(arr).distinct().count();