diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java index 1f275a7..0695530 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java @@ -78,6 +78,7 @@ public class BaseUtil { BaseUtil.exportWord(res, wordPath); } catch (Exception e) { log.error("文件导出异常: {}", e.getMessage()); + e.printStackTrace(); } AsposeUtil.wordToPdf(wordPath, pdfPath); BaseUtil.readPdf(response,pdfPath); @@ -138,6 +139,7 @@ public class BaseUtil { JSONObject jsonObject = jsonArray.getJSONObject(i); String name = jsonObject.getString("name"); String url = jsonObject.getString("url"); + url = URLEncoder.encode(url, "UTF-8"); String id = paragraph.getDocument().getPackagePart().addExternalRelationship(url, XWPFRelation.HYPERLINK.getRelation()).getId(); CTHyperlink cLink = paragraph.getCTP().addNewHyperlink(); cLink.setId(id); @@ -146,7 +148,7 @@ public class BaseUtil { CTR ctr = CTR.Factory.newInstance(); ctr.setTArray(new CTText[]{ctText}); cLink.setRArray(new CTR[]{ctr}); - if(i