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 88f12b1f..4494cc85 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/repository/PALRepositoryQueryAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java index cfb7afd0..af18201e 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java @@ -3825,6 +3825,57 @@ public class PALRepositoryQueryAPIManager { return result; } + + /** + * 导出单个制度手册 + * 仅限于应用流程手册com.awspaas.user.apps.coe.pal.output.bd下的手册导出 + * + * @param wsId 资产库Id + * @param userId 用户Id + * @param teamId 小组Id + * @param fileId 流程文件Id + * @return 返回创建流程手册结果及taskId + */ + public String createOutputReportFA(String wsId, String userId, String teamId, String fileId) { + UserContext _uc = UserContext.fromUID(userId); + OutPutReportWeb web = new OutPutReportWeb(_uc); + String appId = "com.awspaas.user.apps.coe.pal.output.zd"; + // 报告生成器参数配置 + String config = "{'isItReport':true,'orderNuberFirst':true,'orderNametwo':false,'reportNameIsItName':'%fileName%_%fileVersion%'}";// 配置 + String title = "方案-手册1"; + + // 获取流程手册下所有的流程模板 + List list = web.getOutputAppByAppId(appId); + OutputAppProfile outputAppProfile = null; + for (OutputAppProfile profile : list) { + if (!"".equals(title) && title.equals(profile.getTitle())) { + outputAppProfile = profile; + break; + } + } + if (outputAppProfile == null) { + throw new AWSException("创建制度手册失败,未找到报告模版"); + } + String profileId = outputAppProfile.getId(); + String taskName = outputAppProfile.getTitle(); + String language = "".equals(outputAppProfile.getLang()) ? "cn" : outputAppProfile.getLang(); + String isExecute = "Y"; + String targetShape = ""; + String relationFileId = ""; + String isModify = "false"; + String taskId = ""; + String result = web.reportSaveByCallable(language, taskName, userId, teamId, profileId, wsId, isExecute, config, fileId, targetShape, relationFileId, isModify, taskId); + ResponseObject ro = ResponseObject.parse(result); + if (ro.isOk()) { + JSONObject object = (JSONObject) ro.getData(); + String id = object.getString("taskId"); + // 更改状态为隐藏,不在界面显示该方式创建的流程手册数据 + new OutputTask().updateIsDisplayStatus(id); + } + return result; + } + + /** * 预览流程手册 * diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java index 12db5011..b9399c71 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java @@ -119,6 +119,28 @@ public class RepositoryTreeUtil { if (model != null) palObject.put("dutyUserName", model.getUserName()); } + + //相关/支持文件 + JSONArray jsonArray1=new JSONArray(); + String relatedName=""; + List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+palModel.getId()+"' and ATTRID='related_support_files'"); + Map map=new HashMap(); + if(relatedRowMap.size()>0){ + for(int i=0;i relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+palModel.getId()+"' and ATTRID='related_support_files'");