diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readword/WordUtilXWPF.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readword/WordUtilXWPF.java index ef2145f6..0a6124f9 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readword/WordUtilXWPF.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readword/WordUtilXWPF.java @@ -136,32 +136,15 @@ public class WordUtilXWPF { // String filePath = // "/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范1.docx"; try { - // file = new File(filePath); elements.clear(); - String path = dcContextpdf.getPath(); - // String filePath = "D:/制度样例1—伊利集团流程制度类文件管理规范2.xml"; //创建实例,加载xml测试文档 - Document docs = new Document(); - docs.loadFromFile(path + fileName); - - // 保存为Docx格式 - - docs.saveToFile(path + name + ".docx", FileFormat.Docx); - - File f = new File(path + fileName); - - InputStream in = new FileInputStream(f); - - byte b[] = new byte[(int) f.length()]; // 创建合适文件大小的数组 - - in.read(b); // 读取文件中的内容到b[]数组 - - in.close(); - - // System.out.println(new String(b)); - - // 保存为Doc格式 //docs.saveToFile("toDoc.doc",FileFormat.Doc); - - // + if(fileName.contains(".xml") || !fileName.contains(".docx")) { + String path = dcContextpdf.getPath(); + // String filePath = "D:/制度样例1—伊利集团流程制度类文件管理规范2.xml"; //创建实例,加载xml测试文档 + Document docs = new Document(); + docs.loadFromFile(path + fileName); + // 保存为Docx格式 + docs.saveToFile(path + name + ".docx", FileFormat.Docx); + } DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration"); DCContext dcContextpdf1 = new DCContext(userContext, dcProfilepdfdoc, diff --git a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm index 81f46d95..221059e2 100755 --- a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm +++ b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm @@ -343,6 +343,7 @@ var pid = "<#parentChartId>"; var teamId = "<#teamId>"; + var jssdk; @@ -411,7 +412,7 @@ }); } - +