| | |
| | | import com.ots.project.tool.exam.ImageUtil; |
| | | import com.ots.project.tool.exam.ZipUtil; |
| | | import com.ots.project.tool.libreoffice.LibreOfficeUtil; |
| | | import com.ots.project.tool.report.APIFan.chart.APIFanChart; |
| | | import com.ots.project.tool.report.CIAQ.chart.CIAQChart; |
| | | import com.ots.project.tool.report.LAQ.chart.LAQChart; |
| | | import com.ots.project.tool.report.MAQTR.chart.MAQTRChart; |
| | | import com.ots.project.tool.report.PAQ.chart.PAQChart; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | |
| | | changColorIfJAQ(textMap, out, reportName, tReportTemplate.getReportType()); |
| | | //} |
| | | |
| | | //PAQ、MAQTR采用、CIAQ新的doc转pdf |
| | | //PAQ、MAQTR采用、CIAQ、APIFan新的doc转pdf |
| | | if(ReportTypeEnum.PAQ.getCode().equals(reportType) || ReportTypeEnum.MAQTR.getCode().equals(reportType) |
| | | || ReportTypeEnum.CIAQ.getCode().equals(reportType)){ |
| | | || ReportTypeEnum.CIAQ.getCode().equals(reportType) ||ReportTypeEnum.API_Fan.getCode().equals(reportType)){ |
| | | PdfUtil.convertPDF(EssConfig.getProfile() + "/" + reportName); |
| | | }else if(ReportTypeEnum.LAQ.getCode().equals(reportType)){ |
| | | PdfUtil.dockerConvertPDF(EssConfig.getProfile(),EssConfig.getDocx2pdfPath(),reportName); |
| | |
| | | |
| | | XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage(getTemplateDownLoadPathByUpLoad(fileName))); |
| | | |
| | | //设置文本 |
| | | changeText(document, textMap); |
| | | if (StringUtils.equals(reportType, ReportTypeEnum.JAQ.getCode())) { |
| | | //设置文本框 |
| | | changeTextBox(document, textMap); |
| | | |
| | | //设置文本框 |
| | | changeTextBox(document, textMap); |
| | | //设置文本 |
| | | changeText(document, textMap); |
| | | }else { |
| | | //设置文本 |
| | | changeText(document, textMap); |
| | | |
| | | //设置文本框 |
| | | changeTextBox(document, textMap); |
| | | } |
| | | |
| | | // //设置文本框 |
| | | // changeTextBox(document, textMap); |
| | | // |
| | | // //设置文本 |
| | | // changeText(document, textMap); |
| | | |
| | | |
| | | |
| | | //插入表格 |
| | | addTableValue(document, autoTableMap); |
| | |
| | | MAQTRChart.changeMAQTRChart(document, dataPath); |
| | | } else if (StringUtils.equals(reportType, ReportTypeEnum.CIAQ.getCode())) { |
| | | CIAQChart.changeChart(document, textMap); |
| | | } else { |
| | | } else if (StringUtils.equals(reportType, ReportTypeEnum.LAQ.getCode())) { |
| | | LAQChart.changeChart(document, textMap); |
| | | } else if(StringUtils.equals(reportType, ReportTypeEnum.API_Fan.getCode())) |
| | | { |
| | | APIFanChart.changeChart(document,textMap); |
| | | } |
| | | else { |
| | | return; |
| | | } |
| | | }catch (Exception e){ |