From 73fbdce54861b42c49647b1f3a43d955c9890d86 Mon Sep 17 00:00:00 2001 From: wyb <1977763549@qq.com> Date: Fri, 29 Aug 2025 15:28:50 +0800 Subject: [PATCH] =?UTF-8?q?imp:=20stream=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archive/job/LisPatientReportCollectJob.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/docus/server/archive/job/LisPatientReportCollectJob.java b/src/main/java/com/docus/server/archive/job/LisPatientReportCollectJob.java index f4b11df..66bf482 100644 --- a/src/main/java/com/docus/server/archive/job/LisPatientReportCollectJob.java +++ b/src/main/java/com/docus/server/archive/job/LisPatientReportCollectJob.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -90,8 +91,15 @@ public class LisPatientReportCollectJob { continue; } // 报告类型gen需要合并 - List genPatientList = patientList.stream().filter(p -> "gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList()); - List otherPatientList = patientList.stream().filter(p -> !"gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList()); + List genPatientList = new ArrayList<>(); + List otherPatientList= new ArrayList<>(); + for (LisPatientListResponse.Patient p : patientList) { + if ("gen".equalsIgnoreCase(p.getRepReportType())) { + genPatientList.add(p); + continue; + } + otherPatientList.add(p); + } tBasicMapper.cancelFileBySource(lisCollectorId, reportDownTwoDto.getPatientId()); if (Func.isNotEmpty(genPatientList)) {