修改BUG

This commit is contained in:
lxd 2025-03-17 10:17:38 +08:00
parent 914ca940b1
commit 2f588f74dc
2 changed files with 18 additions and 6 deletions

View File

@ -424,15 +424,24 @@ public class InspectPatientController {
switch (type) {
case "XCG":
model = "cbc";
if(patientDO.getXcgcode()!=null)
{
barCode = patientDO.getXcgcode();
}
break;
case "NCG":
model = "rt";
if(patientDO.getNcgcode()!=null)
{
barCode = patientDO.getNcgcode();
}
break;
case "SHQX":
model = "bt";
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);
}
}

View File

@ -163,7 +163,7 @@ public class InspectPatientServiceImpl implements InspectPatientService {
}
//患者体检报告单相关
private List<BufferedImage> createPDF_playwright(String htmlContent) {
private List<BufferedImage> createPDF_playwright(String htmlContent) throws Exception {
List<BufferedImage> _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()) {