imp: stream去除

master
wyb 4 months ago
parent f1f0aa8836
commit 73fbdce548

@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -90,8 +91,15 @@ public class LisPatientReportCollectJob {
continue; continue;
} }
// 报告类型gen需要合并 // 报告类型gen需要合并
List<LisPatientListResponse.Patient> genPatientList = patientList.stream().filter(p -> "gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList()); List<LisPatientListResponse.Patient> genPatientList = new ArrayList<>();
List<LisPatientListResponse.Patient> otherPatientList = patientList.stream().filter(p -> !"gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList()); List<LisPatientListResponse.Patient> 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()); tBasicMapper.cancelFileBySource(lisCollectorId, reportDownTwoDto.getPatientId());
if (Func.isNotEmpty(genPatientList)) { if (Func.isNotEmpty(genPatientList)) {

Loading…
Cancel
Save