final List evaluationExaminers = midLevelDemocracyEvaluations.stream() .peek(standardMiddleEvaluation -> setMidLevelEvaluationInfo(standardMiddleEvaluation, standardMiddleEvaluation, templateCode)) .map(currentMiddleEvaluation -> { evaluationExaminers.add(createEvaluationExaminer(activityId, loginUserPojo, currentMiddleEvaluation, appraiseeEmpCodeMap, examinerEmpMap)); leaderIncorruptibleEvaluationConvertMapper.copyMidLevelEvalaution(currentMiddleEvaluation, standardMiddleEvaluation); return currentMiddleEvaluation; }) .filter(currentMiddleEvaluation -> StringUtils.isBlank(currentMiddleEvaluation.getAppraiseeName())) .findFirst() .map(currentMiddleEvaluation -> { setMidLevelEvaluationInfo(standardMiddleEvaluation, currentMiddleEvaluation, templateCode); return currentMiddleEvaluation; }) .orElse(null); return evaluationExaminers;

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

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

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