diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 39594d91..cd426cfa 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java index 913575b0..5ace0614 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java @@ -556,7 +556,7 @@ public class OutputWordUtil { //定义表格数据 String[] header = {"版本", "拟制/修订单位","拟制/修订人","拟制/修订日期","审核人","复核人","审批人","修订内容及理由"}; String[][] strArray2 = new String[versionHistoryTable.size()][]; - List list = new LinkedList<>(); + List list = new LinkedList<>(); for (int i = 0; i < versionHistoryTable.size(); i++) { JSONObject jsonObject = versionHistoryTable.getJSONObject(i); String[] strArray = new String[8]; @@ -898,10 +898,9 @@ public class OutputWordUtil { Section section = doc.getLastSection(); //添加段落,设置一级序列 - Paragraph paragraph = section.addParagraph(); + //Paragraph paragraph = section.addParagraph(); //paragraph.appendBreak(BreakType.Page_Break); - //Section section2 = doc.addSection(); //关键控制点风险矩阵 开始 PALRepositoryPropertyModel riskMatrixInfo = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(), "riskMatrixInfo"); @@ -1265,18 +1264,18 @@ public class OutputWordUtil { if (relationList.size() > 0) { for (DesignerShapeRelationModel relation : relationList) { String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID - List models = PALRepositoryCache.getByVersionId(relationFileId); - if (models != null && models.size() > 0) { - index++; - for(PALRepositoryModel oneModel:models){ - if(oneModel.isUse()==true){ - JSONObject tmp = new JSONObject(); - tmp.put("name", oneModel.getName()); - tmp.put("desc", index); - related_support_files.add(tmp); - } + List models = PALRepositoryCache.getByVersionId(relationFileId); + if (models != null && models.size() > 0) { + index++; + for(PALRepositoryModel oneModel:models){ + if(oneModel.isUse()==true){ + JSONObject tmp = new JSONObject(); + tmp.put("name", oneModel.getName()); + tmp.put("desc", index); + related_support_files.add(tmp); } } + } } @@ -1438,6 +1437,7 @@ public class OutputWordUtil { if (suffix.equals(".doc") || suffix.equals(".docx")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/word.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".doc")) { paragraph5.appendOleObject(stream1, pic1, "doc"); } else if (suffix.equals(".docx")) { @@ -1446,10 +1446,12 @@ public class OutputWordUtil { } else if (suffix.equals(".pdf")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/pdf.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 paragraph5.appendOleObject(stream1, pic1, "pdf"); } else if (suffix.equals(".xls") || suffix.equals(".xlsx")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/xls.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".xls")) { paragraph5.appendOleObject(stream1, pic1, "xls"); } else if (suffix.equals(".xlsx")) { @@ -1458,6 +1460,7 @@ public class OutputWordUtil { } else if (suffix.equals(".png") || suffix.equals(".jgp")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/png.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".png")) { paragraph5.appendOleObject(stream1, pic1, "png"); } else if (suffix.equals(".jpg")) { @@ -1466,6 +1469,7 @@ public class OutputWordUtil { } else if (suffix.equals(".zip") || suffix.equals(".rar")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/zip.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".zip")) { paragraph5.appendOleObject(stream1, pic1, "zip"); } else if (suffix.equals(".rar")) { @@ -1474,6 +1478,7 @@ public class OutputWordUtil { } else if (suffix.equals(".mp3") || suffix.equals(".mp4")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/mp3.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".mp3")) { paragraph5.appendOleObject(stream1, pic1, "mp3"); } else if (suffix.equals(".mp4")) { @@ -1482,6 +1487,7 @@ public class OutputWordUtil { } else if (suffix.equals(".ppt") || suffix.equals(".pptx")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/ppt.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 if (suffix.equals(".ppt")) { paragraph5.appendOleObject(stream1, pic1, "ppt"); } else if (suffix.equals(".pptx")) { @@ -1490,6 +1496,7 @@ public class OutputWordUtil { } else if (suffix.equals(".txt")) { pic1.loadImage("../doccenter/com.awspaas.user.apps.coe.pal.output.zd/filepic/txt.png"); paragraph5.appendText(dcContextModel.getFileName()+" "); + paragraph5.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式 paragraph5.appendOleObject(stream1, pic1, "txt"); }