if(CollectionUtils.isNotEmpty(collect)){
orginal=collect.stream().collect(Collectors.collectingAndThen(
Collectors.toCollection(
()->newTreeSet<>(Comparator.comparing(DistrictLog::getInhospitalPatientId))),
ArrayList::new));
}
}
if(CollectionUtils.isNotEmpty(collect)){
orginal=collect.stream().collect(Collectors.collectingAndThen(
Collectors.toCollection(
()->newTreeSet<>(Comparator.comparing(DistrictLog::getInhospitalPatientId))),
ArrayList::new));
}
}