Commit f26b704b81480a4c894eadb6a39a679b8a6a3f12

Authored by liquanyu
1 parent 1d81366457

导出

Showing 1 changed file with 25 additions and 10 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ f26b704
... ... @@ -679,11 +679,18 @@
679 679 }
680 680 listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService)));
681 681 }
682   - for (Future f : listFuture) {
683   - try {
684   - data.addAll((List) f.get(30, TimeUnit.SECONDS));
685   - } catch (Exception e) {
686   - ExceptionUtils.catchException(e, "convertToQuanCPatient get result Future error.");
  682 + if (CollectionUtils.isNotEmpty(listFuture))
  683 + {
  684 + for (Future f : listFuture) {
  685 + try {
  686 + if (f != null)
  687 + {
  688 + data.addAll((List) f.get(30, TimeUnit.SECONDS));
  689 + }
  690 +
  691 + } catch (Exception e) {
  692 + ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error.");
  693 + }
687 694 }
688 695 }
689 696 return data;
690 697  
... ... @@ -702,13 +709,21 @@
702 709 }
703 710 listFuture.add(commonThreadPool.submit(new QuanPatientWorker(patientses.subList(i, end), usersService, hospital, antExService, basicConfigService, patientsService, organizationService)));
704 711 }
705   - for (Future f : listFuture) {
706   - try {
707   - data.addAll((List) f.get(30, TimeUnit.SECONDS));
708   - } catch (Exception e) {
709   - ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error.");
  712 + if (CollectionUtils.isNotEmpty(listFuture))
  713 + {
  714 + for (Future f : listFuture) {
  715 + try {
  716 + if (f != null)
  717 + {
  718 + data.addAll((List) f.get(30, TimeUnit.SECONDS));
  719 + }
  720 +
  721 + } catch (Exception e) {
  722 + ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error.");
  723 + }
710 724 }
711 725 }
  726 +
712 727 return data;
713 728 }
714 729