diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java index b69d7c7..7321689 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java @@ -424,15 +424,24 @@ public class InspectPatientController { switch (type) { case "XCG": model = "cbc"; - barCode = patientDO.getXcgcode(); + if(patientDO.getXcgcode()!=null) + { + barCode = patientDO.getXcgcode(); + } break; case "NCG": model = "rt"; - barCode = patientDO.getNcgcode(); + if(patientDO.getNcgcode()!=null) + { + barCode = patientDO.getNcgcode(); + } break; case "SHQX": model = "bt"; - barCode = patientDO.getShqx(); + if(patientDO.getShqx()!=null) + { + barCode = patientDO.getShqx(); + } break; } ConfigDO config = configService.getConfigByKey("url.reporttj"); @@ -455,7 +464,7 @@ public class InspectPatientController { } catch (IOException e) { e.printStackTrace(); - return success(false); + return success(true); } } diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java index 10b2ec0..a579dca 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java @@ -163,7 +163,7 @@ public class InspectPatientServiceImpl implements InspectPatientService { } //患者体检报告单相关 - private List createPDF_playwright(String htmlContent) { + private List createPDF_playwright(String htmlContent) throws Exception { List _out = new ArrayList<>(); try { Playwright playwright = null; @@ -206,6 +206,7 @@ public class InspectPatientServiceImpl implements InspectPatientService { } } catch (Exception e) { _out = null; + throw e; } finally { try { if (document != null) document.close(); @@ -215,6 +216,7 @@ public class InspectPatientServiceImpl implements InspectPatientService { } } catch (Exception ex) { _out = null; + throw ex; } finally { try { if (page != null && !page.isClosed()) page.close(); @@ -231,6 +233,7 @@ public class InspectPatientServiceImpl implements InspectPatientService { } } catch (Exception exOut) { _out = null; + throw exOut; } finally { System.gc(); } @@ -588,7 +591,7 @@ public class InspectPatientServiceImpl implements InspectPatientService { outRes.put("msg", "https://pacs.gw12320.com/video/" + fosPath_file); } catch (Exception ex) { outRes.put("code", -200); - outRes.put("msg", ""); + outRes.put("msg", ex.getMessage()); } finally { try { if (officeManager != null && officeManager.isRunning()) {