From d730f5a962dd99b766626ac4be57c155b6853737 Mon Sep 17 00:00:00 2001 From: jiangs <373297395@qq.com> Date: Sat, 20 Sep 2025 23:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interfaceCommon/utils/ReportUtil.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/ReportUtil.java b/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/ReportUtil.java index e8727fd..d81c015 100644 --- a/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/ReportUtil.java +++ b/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/ReportUtil.java @@ -238,16 +238,22 @@ public class ReportUtil { e.printStackTrace(); log.error("打印条码失败,参数{}",barCodeParam,e); } - String httpPath = ""; - if(printURL == null || printURL.equals("")){ - httpPath = "http://"+ IpUtils.getHostIp() +":" + port + "/"+pdfName+".pdf"; - }else{ - httpPath = "http://"+ printURL +":" + port + "/"+pdfName+".pdf"; - } + String httpPath = getPrintURL(pdfName); log.info("传给前端的pdf地址:{}",httpPath); return new Result("0","打印成功!",httpPath); } + public String getPrintURL(String pdfName){ + String httpPath = ""; + if(printURL == null || printURL.equals("")){ + httpPath = "http://"+ IpUtils.getHostIp() +":" + port + "/printPDF/"+pdfName+".pdf"; + }else{ + httpPath = "http://"+ printURL +":" + port + "/printPDF/"+pdfName+".pdf"; + } + + return httpPath; + } + /** * 判断当前报告单是否使用A4报告单 * @param jyrq