feat:梅州中医院,LIS报告无法采集进行日志输出,便于反馈问题

master
wyb 2 months ago
parent 375b2ac11f
commit f39992abc3

@ -97,16 +97,23 @@ public class MzZyyReportCollectJob {
List<String> httpUrls = new ArrayList<>();
int i = 1;
for (MzZyyTestDto testFormPdf : testFormPdfs) {
MzZyyLisType lisType = MzZyyLisType.getLisType(testFormPdf.getType());
List<MzZyyLisExportDto> 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<MzZyyLisExportDto> 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());

Loading…
Cancel
Save