解决冲突

This commit is contained in:
jiangs 2025-09-20 23:29:49 +08:00
parent e172a4eae4
commit d730f5a962

View File

@ -238,16 +238,22 @@ public class ReportUtil {
e.printStackTrace(); e.printStackTrace();
log.error("打印条码失败,参数{}",barCodeParam,e); log.error("打印条码失败,参数{}",barCodeParam,e);
} }
String httpPath = ""; String httpPath = getPrintURL(pdfName);
if(printURL == null || printURL.equals("")){
httpPath = "http://"+ IpUtils.getHostIp() +":" + port + "/"+pdfName+".pdf";
}else{
httpPath = "http://"+ printURL +":" + port + "/"+pdfName+".pdf";
}
log.info("传给前端的pdf地址:{}",httpPath); log.info("传给前端的pdf地址:{}",httpPath);
return new Result("0","打印成功!",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报告单 * 判断当前报告单是否使用A4报告单
* @param jyrq * @param jyrq