diff --git a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar deleted file mode 100644 index 324276ee..00000000 Binary files a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar and /dev/null differ diff --git a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar index b809a49d..2c9766ac 100644 Binary files a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar and b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar differ diff --git a/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java b/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java index 21eb0350..344e4cc3 100644 --- a/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java +++ b/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java @@ -221,15 +221,47 @@ public class Report1Gener { file.mkdir(); } } + + //文件属性附件 + int fileIndex = 1; + if (search != null && search.size() > 0) { + // 复制附件 + for (UpfileModel upfileModel : search) { + if (!"f".equals(upfileModel.getType())) {// 文件 + continue; + } + // 复制doccenter下的文件 + DCContext dcContext = null; + DCPluginProfile dcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE); + if (dcProfile != null) { + dcContext = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, "file", upfileModel.getPl_uuid(), upfileModel.getFileName()); + } + File sourceFile = new UtilFile(dcContext.getFilePath()); + File targetFile = new UtilFile(file.toString() + File.separator + dcContext.getFileName()); + try { + UtilFile.copyFile(sourceFile, targetFile); + } catch (Exception e) { + System.out.println(e); + e.printStackTrace(); + } + JSONObject object = new JSONObject(); + object.put("file_name", fileIndex + "." + upfileModel.getFileName()); + String link = fileName + File.separator + upfileModel.getFileName(); + object.put("link", link); + fileTable.add(object); + fileIndex++; + } + } + if (repositoryFileElements != null) { int index = 1;// 流程步骤序号 int dangerIndex = 1;// 风险序号 int regulateIndex = 1;// 控制序号 for (Map shape : repositoryFileElements) { //如果图形元素不是流程步骤,不导出该元素 - if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { - continue; - } +// if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { +// continue; +// } JSONObject _tr = new JSONObject(); OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值 _tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号 @@ -269,10 +301,11 @@ public class Report1Gener { e.printStackTrace(); } JSONObject object = new JSONObject(); - object.put("shape_file_name", upfileModel.getFileName()); + object.put("shape_file_name", fileIndex+"."+upfileModel.getFileName()); String link = fileName + File.separator + upfileModel.getFileName(); object.put("shape_file_link", link); shapeFileTable.add(object); + fileIndex++; } } if(shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误 @@ -320,36 +353,6 @@ public class Report1Gener { // 流程步骤的指标表格 setTableValueOfKPI("kpi", repositoryId, KPITable, relationFileMap); - - if (search != null && search.size() > 0) { - // 复制附件 - int index = 1; - for (UpfileModel upfileModel : search) { - if (!"f".equals(upfileModel.getType())) {// 文件 - continue; - } - // 复制doccenter下的文件 - DCContext dcContext = null; - DCPluginProfile dcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE); - if (dcProfile != null) { - dcContext = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, "file", upfileModel.getPl_uuid(), upfileModel.getFileName()); - } - File sourceFile = new UtilFile(dcContext.getFilePath()); - File targetFile = new UtilFile(file.toString() + File.separator + dcContext.getFileName()); - try { - UtilFile.copyFile(sourceFile, targetFile); - } catch (Exception e) { - System.out.println(e); - e.printStackTrace(); - } - JSONObject object = new JSONObject(); - object.put("file_name", index + "." + upfileModel.getFileName()); - String link = fileName + File.separator + upfileModel.getFileName(); - object.put("link", link); - fileTable.add(object); - index++; - } - } dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable); dataMap.put("file_table", fileTable); diff --git a/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml b/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml index 60c63b83..dfc9475e 100644 --- a/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml +++ b/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml @@ -4411,6 +4411,7 @@ y7fdOgAAAABJRU5ErkJggk== + ${table4.file_name} @@ -4418,33 +4419,34 @@ y7fdOgAAAABJRU5ErkJggk== <#list repository_shape_table as table1> - <#list table1.shape_File_Table as table11> - - - - - - - - - - - - - - - - - - - - - ${table11.shape_file_name} - - - - - + <#list table1.shape_File_Table as table11> + + + + + + + + + + + + + + + + + + + + + + ${table11.shape_file_name} + + + + +