public static Stream groupRemoveAppraiseeAttribute(final List midLevelDemocracyEvaluations) { return midLevelDemocracyEvaluations.stream() .collect(Collectors.groupingBy(MidLevelDemocracyEvaluationVO::getAppraiseeEmpCode)) //根据被考核者员工编号进行分组 .values() .stream() .flatMap(MidLevelDemocracyEvaluationUtils::removeAppraiseeAttribute) //扁平化处理,删除多余的被考核者属性 .sorted(new MidLevelEvaluationComparator());

代码优化 public static StreamMidLevelDemocracyEvaluationVO groupRemoveAppraiseeAttributefinal ListMidLevelDemocracyEvaluationVO midLevelDemocracyEvaluations return CollectionUtilsemptyIfNullmid

原文地址: https://www.cveoy.top/t/topic/iAKS 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录