final List evaluationExaminers = midLevelDemocracyEvaluations.stream() .skip(1) .map(currentMiddleEvaluation -> { if (StringUtils.isBlank(currentMiddleEvaluation.getAppraiseeName())) { setMidLevelEvaluationInfo(standardMiddleEvaluation, currentMiddleEvaluation, templateCode); return null; } return createEvaluationExaminer(activityId, loginUserPojo, currentMiddleEvaluation, appraiseeEmpCodeMap, examinerEmpMap); }) .filter(Objects::nonNull) .peek(currentMiddleEvaluation -> leaderIncorruptibleEvaluationConvertMapper.copyMidLevelEvalaution(currentMiddleEvaluation, standardMiddleEvaluation)) .collect(Collectors.toList());

return evaluationExaminers;

Java代码优化:使用Stream简化中层民主测评数据处理

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

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