From 94c73409b82edbfeef2b2dc678526f09f9d28169 Mon Sep 17 00:00:00 2001 From: linzhijie <1003392067@qq.com> Date: 星期日, 23 四月 2023 16:43:40 +0800 Subject: [PATCH] CIAQ图表替换 --- src/main/java/com/ots/common/utils/poi/WordUtil.java | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ots/common/utils/poi/WordUtil.java b/src/main/java/com/ots/common/utils/poi/WordUtil.java index b8f1bd0..aa23e48 100644 --- a/src/main/java/com/ots/common/utils/poi/WordUtil.java +++ b/src/main/java/com/ots/common/utils/poi/WordUtil.java @@ -903,9 +903,8 @@ if (checkText(runValue)) { runValue = runValue.replaceAll("%.*%", ""); - runValue = runValue.replaceAll("N/A NONE", ""); - } + runValue = runValue.replaceAll("N/A NONE", ""); return runValue; } @@ -1172,23 +1171,24 @@ //妯℃澘鏂囦欢闇�瑕佸姞閿� out = getDownLoadFileOutputStream(reportName); - synchronized (fileName.intern()){ + //synchronized (fileName.intern()){ //String templateType = tReportTemplate.getTemplateType(); setChageWord(fileName, out, textMap, tReportTemplate.getReportType(),tReportTemplate.getDataPath(), autoTableMap); out.flush(); changColorIfJAQ(textMap, out, reportName, tReportTemplate.getReportType()); - } + //} //PAQ銆丮AQTR閲囩敤鏂扮殑doc杞琾df - if(ReportTypeEnum.PAQ.getCode().equals(reportType) || ReportTypeEnum.MAQTR.getCode().equals(reportType)){ + if(ReportTypeEnum.PAQ.getCode().equals(reportType) || ReportTypeEnum.MAQTR.getCode().equals(reportType) + || ReportTypeEnum.CIAQ.getCode().equals(reportType)){ PdfUtil.convertPDF(EssConfig.getProfile() + "/" + reportName); }else{ - // ShellTool.execLibreofficeCommand("pdf", EssConfig.getProfile() + "/" + reportName, EssConfig.getProfile() + "/"); + ShellTool.execLibreofficeCommand("pdf", EssConfig.getProfile() + "/" + reportName, EssConfig.getProfile() + "/"); // ShellTool shellTool = ShellTool.builder(); // shellTool.execNewLibreofficeCommand("pdf", EssConfig.getProfile() + "/" + reportName, EssConfig.getProfile() + "/" + reportName.replace("docx","pdf")); //鏂版柟娉曟祴璇� - LibreOfficeUtil.convertOffice2PDFSyncIsSuccess(new File(EssConfig.getProfile() + "/" + reportName),new File(EssConfig.getProfile() + "/" + reportName.replace("docx","pdf"))); + //LibreOfficeUtil.convertOffice2PDFSyncIsSuccess(new File(EssConfig.getProfile() + "/" + reportName),new File(EssConfig.getProfile() + "/" + reportName.replace("docx","pdf"))); } zipFilePath = getPdfPath(reportName); @@ -1348,9 +1348,9 @@ repText = repText.replaceAll("<BoldText>", ""); repText = repText.replaceAll("</BoldText>", ""); } - if (repText.indexOf("N/A NONE") != -1) { +/* if (repText.indexOf("N/A NONE") != -1) { repText = repText.replaceAll("N/A NONE", ""); - } + }*/ return repText; } public static void changTableColor(String fileName, OutputStream out, List<JAQTableStyle> jaqTableStyleList) throws IOException { -- Gitblit v1.9.1