diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java index edf3c4b..cb9f2b2 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java @@ -679,11 +679,18 @@ public class PatientFacade { } listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService))); } - for (Future f : listFuture) { - try { - data.addAll((List) f.get(30, TimeUnit.SECONDS)); - } catch (Exception e) { - ExceptionUtils.catchException(e, "convertToQuanCPatient get result Future error."); + if (CollectionUtils.isNotEmpty(listFuture)) + { + for (Future f : listFuture) { + try { + if (f != null) + { + data.addAll((List) f.get(30, TimeUnit.SECONDS)); + } + + } catch (Exception e) { + ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); + } } } return data; @@ -702,13 +709,21 @@ public class PatientFacade { } listFuture.add(commonThreadPool.submit(new QuanPatientWorker(patientses.subList(i, end), usersService, hospital, antExService, basicConfigService, patientsService, organizationService))); } - for (Future f : listFuture) { - try { - data.addAll((List) f.get(30, TimeUnit.SECONDS)); - } catch (Exception e) { - ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); + if (CollectionUtils.isNotEmpty(listFuture)) + { + for (Future f : listFuture) { + try { + if (f != null) + { + data.addAll((List) f.get(30, TimeUnit.SECONDS)); + } + + } catch (Exception e) { + ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); + } } } + return data; }