From 0fe65b9d2a7db535ac787a4c5863900a9ef057b5 Mon Sep 17 00:00:00 2001 From: mzr Date: Wed, 24 Jul 2024 16:43:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E5=8D=95PDF=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yb/lb/webapp/Invoice/service/CrmInvoiceService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crm-webapp/src/main/java/com/yb/lb/webapp/Invoice/service/CrmInvoiceService.java b/crm-webapp/src/main/java/com/yb/lb/webapp/Invoice/service/CrmInvoiceService.java index 4000948..b79a199 100644 --- a/crm-webapp/src/main/java/com/yb/lb/webapp/Invoice/service/CrmInvoiceService.java +++ b/crm-webapp/src/main/java/com/yb/lb/webapp/Invoice/service/CrmInvoiceService.java @@ -325,7 +325,8 @@ public class CrmInvoiceService { String saleOrderNo = invMap.get("saleOrderNo") + ""; String path = ReadXmlutils.xmlForMap("", "invOrderPath"); String companyUrl = "2".equals(tokenMap.get("companyId") + "") ? "/dehao/" : "/kesai/"; - String fileUrl = path + companyUrl + clientName + invoiceNo + "-" + saleOrderNo + ".pdf"; + String pdfFileName = clientName + invoiceNo + "-" + saleOrderNo + ".pdf"; + String fileUrl = path + companyUrl + pdfFileName; File file = new File(fileUrl); // 如果文件不存在就生成 if (!file.exists()) { @@ -333,7 +334,7 @@ public class CrmInvoiceService { // 回写pdf的路径 Map map = new HashMap<>(); map.put("id", id); - map.put("invUrl", "/invOrder" + companyUrl + clientName + invoiceNo + ".pdf"); + map.put("invUrl", "/invOrder" + companyUrl + pdfFileName); this.update(map, ".update"); file = new File(fileUrl); }