From f39992abc33ebc308de400032bdeb8ab50a75709 Mon Sep 17 00:00:00 2001 From: wyb <1977763549@qq.com> Date: Wed, 21 May 2025 07:48:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A2=85=E5=B7=9E=E4=B8=AD=E5=8C=BB?= =?UTF-8?q?=E9=99=A2=EF=BC=8CLIS=E6=8A=A5=E5=91=8A=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=87=87=E9=9B=86=E8=BF=9B=E8=A1=8C=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA=EF=BC=8C=E4=BE=BF=E4=BA=8E=E5=8F=8D=E9=A6=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mzzyy/job/MzZyyReportCollectJob.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/docus/server/mzzyy/job/MzZyyReportCollectJob.java b/src/main/java/com/docus/server/mzzyy/job/MzZyyReportCollectJob.java index cfb2482..da54e8a 100644 --- a/src/main/java/com/docus/server/mzzyy/job/MzZyyReportCollectJob.java +++ b/src/main/java/com/docus/server/mzzyy/job/MzZyyReportCollectJob.java @@ -97,16 +97,23 @@ public class MzZyyReportCollectJob { List httpUrls = new ArrayList<>(); int i = 1; for (MzZyyTestDto testFormPdf : testFormPdfs) { - MzZyyLisType lisType = MzZyyLisType.getLisType(testFormPdf.getType()); - List base64Files = mzZyyLisService.exportTestFormPdf(lisType, testFormPdf.getMachineId(), testFormPdf.getSampleId(), testFormPdf.getTestDate()); - for (MzZyyLisExportDto base64File : base64Files) { - String filePath = fileDirPath + File.separator + i + "." + base64File.getType().toLowerCase(Locale.ROOT); - String httpUrl = "http://127.0.0.1:9010/lis/" + formatDate + "/" + patientId + "/" + i + "." + base64File.getType().toLowerCase(Locale.ROOT); - String base64 = base64File.getBase64(); - byte[] decode = Base64.getDecoder().decode(base64); - FileUtil.writeBytes(decode, filePath); - httpUrls.add(httpUrl); - i++; + try { + MzZyyLisType lisType = MzZyyLisType.getLisType(testFormPdf.getType()); + List base64Files = mzZyyLisService.exportTestFormPdf(lisType, testFormPdf.getMachineId(), testFormPdf.getSampleId(), testFormPdf.getTestDate()); + for (MzZyyLisExportDto base64File : base64Files) { + String filePath = fileDirPath + File.separator + i + "." + base64File.getType().toLowerCase(Locale.ROOT); + String httpUrl = "http://127.0.0.1:9010/lis/" + formatDate + "/" + patientId + "/" + i + "." + base64File.getType().toLowerCase(Locale.ROOT); + String base64 = base64File.getBase64(); + byte[] decode = Base64.getDecoder().decode(base64); + FileUtil.writeBytes(decode, filePath); + httpUrls.add(httpUrl); + i++; + } + } catch (Exception ex) { + log.error("梅州中医院Lis采集,住院号:" + inpatientNo + ",住院流水号:" + jzh + ",type=" + testFormPdf.getType() + + ",machineId=" + testFormPdf.getMachineId() + ",sampleId=" + testFormPdf.getSampleId() + ",testDate=" + testFormPdf.getTestDate() + + ",采集base64出现错误," + ex.getMessage(), ex); + return; } } log.info("住院号:{},住院流水号:{},采集了 {} 份文件。", inpatientNo, jzh, httpUrls.size());