diff --git a/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml b/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml
deleted file mode 100644
index ae673ea65..000000000
--- a/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_core_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_core_2_0_2.xml
deleted file mode 100644
index df21c44d2..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_core_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_pdf_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_pdf_2_0_2.xml
deleted file mode 100644
index 6683dce85..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_pdf_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_xhtml_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_xhtml_2_0_2.xml
deleted file mode 100644
index 6fc98a269..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_poi_xwpf_converter_xhtml_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_2_0_2.xml
deleted file mode 100644
index 6fea8034f..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_docx_xwpf_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_docx_xwpf_2_0_2.xml
deleted file mode 100644
index 56c5ada6b..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_converter_docx_xwpf_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_core_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_core_2_0_2.xml
deleted file mode 100644
index 0c1dfdbbb..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_core_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_itext_extension_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_itext_extension_2_0_2.xml
deleted file mode 100644
index a99409b04..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_fr_opensagres_xdocreport_itext_extension_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__fr_opensagres_xdocreport_xdocreport_2_0_2.xml b/.idea/libraries/Maven__fr_opensagres_xdocreport_xdocreport_2_0_2.xml
deleted file mode 100644
index 37428aa99..000000000
--- a/.idea/libraries/Maven__fr_opensagres_xdocreport_xdocreport_2_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_poi_ooxml_schemas_1_4.xml b/.idea/libraries/Maven__org_apache_poi_ooxml_schemas_1_4.xml
deleted file mode 100644
index aca2261d6..000000000
--- a/.idea/libraries/Maven__org_apache_poi_ooxml_schemas_1_4.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/emis-biz-web/emis-biz-web.iml b/emis-biz-web/emis-biz-web.iml
index dd71cc2b7..44288d228 100644
--- a/emis-biz-web/emis-biz-web.iml
+++ b/emis-biz-web/emis-biz-web.iml
@@ -170,46 +170,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -296,16 +261,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/emis-biz/emis-biz.iml b/emis-biz/emis-biz.iml
index bdb0c2751..f885bff85 100644
--- a/emis-biz/emis-biz.iml
+++ b/emis-biz/emis-biz.iml
@@ -41,7 +41,6 @@
-
@@ -124,46 +123,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -255,16 +219,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/emis-biz/pom.xml b/emis-biz/pom.xml
index 1c41e5009..b23af1018 100644
--- a/emis-biz/pom.xml
+++ b/emis-biz/pom.xml
@@ -21,6 +21,20 @@
com.xdadan
emis-common
1.0.4
+
+
+ jsqlparser
+ com.github.jsqlparser
+
+
+ guava
+ com.google.guava
+
+
+ commons-logging
+ commons-logging
+
+
@@ -90,12 +104,6 @@
com.aliyun
dysmsapi20170525
2.0.22
-
-
- tea
- com.aliyun
-
-
com.aliyun
@@ -131,39 +139,27 @@
com.deepoove
poi-tl
1.10.6
+
+
+ commons-logging
+ commons-logging
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
- fr.opensagres.xdocreport
- xdocreport
- 2.0.2
-
-
-
- fr.opensagres.xdocreport
- fr.opensagres.xdocreport.converter.docx.xwpf
- 2.0.2
-
-
@@ -180,20 +176,6 @@
${project.basedir}/lib/aspose-words-15.8.0-jdk16.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/warehouse/DocXdocUtils.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/warehouse/DocXdocUtils.java
index a82125ec4..f173dabf8 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/warehouse/DocXdocUtils.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/warehouse/DocXdocUtils.java
@@ -1,18 +1,7 @@
package com.xdadan.erp.emis.service.warehouse;
-
-import com.aspose.words.*;
import com.deepoove.poi.XWPFTemplate;
-import com.lowagie.text.Font;
-import com.lowagie.text.pdf.BaseFont;
-import fr.opensagres.poi.xwpf.converter.pdf.PdfConverter;
-import fr.opensagres.poi.xwpf.converter.pdf.PdfOptions;
-import fr.opensagres.xdocreport.itext.extension.font.IFontProvider;
-import fr.opensagres.xdocreport.itext.extension.font.ITextFontRegistry;
-import lombok.SneakyThrows;
-import org.apache.poi.xwpf.usermodel.XWPFDocument;
-import java.awt.*;
import java.io.*;
import java.util.Map;
@@ -34,66 +23,66 @@ public class DocXdocUtils {
}
- private static PdfOptions getPdfOptions() {
- PdfOptions pdfOptions = PdfOptions.create();
+// private static PdfOptions getPdfOptions() {
+// PdfOptions pdfOptions = PdfOptions.create();
+//
+// pdfOptions.fontProvider(new IFontProvider() {
+// public Font getFont(String familyName, String encoding, float size, int style, Color color) {
+// try {
+//
+// BaseFont bfSimfang = BaseFont.createFont("/font/simfang.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
+// BaseFont bfSimSun = BaseFont.createFont("/font/simsun.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
+// BaseFont bfSimHei = BaseFont.createFont("/font/simhei.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
+//
+// Font fontSimfang = new Font(bfSimfang, size, style, color);
+// fontSimfang.setFamily("仿宋");
+//
+// Font fontSimSun = new Font(bfSimSun, size, style, color);
+// fontSimSun.setFamily("宋体");
+//
+// Font fontSimHei = new Font(bfSimHei, size, style, color);
+// fontSimHei.setFamily("黑体");
+//
+// System.out.println("===>familyName==>"+familyName);
+// if ("仿宋".equals(familyName)) {
+// return fontSimfang;
+// }
+// else if ("宋体".equals(familyName)) {
+// return fontSimSun;
+// }
+// else if ("黑体".equals(familyName)) {
+// return fontSimHei;
+// }
+//
+// return fontSimSun;
+// } catch (Throwable e) {
+// e.printStackTrace();
+// // An error occurs, use the default font provider.
+// return ITextFontRegistry.getRegistry().getFont(familyName, encoding, size, style, color);
+// }
+// }
+// });
+// return pdfOptions;
+// }
- pdfOptions.fontProvider(new IFontProvider() {
- public Font getFont(String familyName, String encoding, float size, int style, Color color) {
- try {
+// public static void convertToPdf(String wordFile, String pdfFile) throws IOException {
+// try (InputStream in = new FileInputStream(wordFile);
+// OutputStream out = new FileOutputStream(pdfFile)) {
+// PdfOptions options = getPdfOptions();
+// XWPFDocument document = new XWPFDocument(in);
+// PdfConverter.getInstance().convert(document, out, options);
+// }
+// }
- BaseFont bfSimfang = BaseFont.createFont("/font/simfang.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
- BaseFont bfSimSun = BaseFont.createFont("/font/simsun.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
- BaseFont bfSimHei = BaseFont.createFont("/font/simhei.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
-
- Font fontSimfang = new Font(bfSimfang, size, style, color);
- fontSimfang.setFamily("仿宋");
-
- Font fontSimSun = new Font(bfSimSun, size, style, color);
- fontSimSun.setFamily("宋体");
-
- Font fontSimHei = new Font(bfSimHei, size, style, color);
- fontSimHei.setFamily("黑体");
-
- System.out.println("===>familyName==>"+familyName);
- if ("仿宋".equals(familyName)) {
- return fontSimfang;
- }
- else if ("宋体".equals(familyName)) {
- return fontSimSun;
- }
- else if ("黑体".equals(familyName)) {
- return fontSimHei;
- }
-
- return fontSimSun;
- } catch (Throwable e) {
- e.printStackTrace();
- // An error occurs, use the default font provider.
- return ITextFontRegistry.getRegistry().getFont(familyName, encoding, size, style, color);
- }
- }
- });
- return pdfOptions;
- }
-
- public static void convertToPdf(String wordFile, String pdfFile) throws IOException {
- try (InputStream in = new FileInputStream(wordFile);
- OutputStream out = new FileOutputStream(pdfFile)) {
- PdfOptions options = getPdfOptions();
- XWPFDocument document = new XWPFDocument(in);
- PdfConverter.getInstance().convert(document, out, options);
- }
- }
-
- public static void main(String[] args) {
- try {
-
- String srcFile="/Users/alan/Downloads/1.docx";
- String destFile="/Users/alan/Downloads/6.pdf";
- convertToPdf(srcFile,destFile);
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+// public static void main(String[] args) {
+// try {
+//
+// String srcFile="/Users/alan/Downloads/1.docx";
+// String destFile="/Users/alan/Downloads/6.pdf";
+// convertToPdf(srcFile,destFile);
+//
+// } catch (Exception e) {
+// e.printStackTrace();
+// }
+// }
}