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)) {