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 f909dc32..5533ad1f 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 5dcfe8b2..f28a3723 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 @@ -773,7 +773,6 @@ public class OutputWordUtil { } if (isPPT == false) { - //复制页眉页脚操作 try { //加载纵向模板文档用于复制 @@ -2736,7 +2735,14 @@ public class OutputWordUtil { String download_id = json.getJSONObject("data").getString("download_id"); String route_key = json.getJSONObject("data").getString("route_key"); //String savePath = AWSPortalConf.getUrl() +"/test/123.doc"; - String savePath = dc.getPath()+"/"+dc.getFileName();; + //patc和name中间不需要加"/"杠,兼容有斜杠的场景 + //String savePath = dc.getPath()+"/"+dc.getFileName(); + String savePath = ""; + if(dc.getPath().endsWith("/")){ + savePath = dc.getPath()+dc.getFileName(); + }else{ + savePath = dc.getPath()+"/"+dc.getFileName(); + } System.out.println("savePath = " + savePath); operateDocumentResultDownload(YiliWpsConst.HOST,download_id,route_key,savePath); return savePath; 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 00d4aa5d..05012113 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 @@ -18,6 +18,8 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import com.actionsoft.apps.coe.pal.pal.repository.util.PALFrameworkFilterUtil; +import com.actionsoft.apps.coe.pal.pal.repository.util.PALFrameworkFilterUtil2; import com.actionsoft.bpms.server.conf.portal.AWSPortalConf; import com.actionsoft.bpms.util.*; import org.apache.commons.collections.CollectionUtils; @@ -2708,8 +2710,21 @@ public class PALRepositoryQueryAPIManager { private JSONArray list2DepartJson(UserContext context, List list, boolean isUsed, boolean isPublished, String removeIds, String param, boolean statusSuffix,String departId,String methods) { JSONArray jsonArray = new JSONArray(); + String[] spilt=departId.split(","); + JSONArray orgIdList=new JSONArray(); + + for(String ele:spilt){ + orgIdList.add(ele); + } + String[] method=methods.split(","); + JSONArray methodIdList=new JSONArray(); + + for(String ele:method){ + methodIdList.add(ele); + } + // 先过滤掉空的架构与空的文件夹 - list = list.stream().filter(model -> { + /*list = list.stream().filter(model -> { boolean flag = true; if ("process.framework".equals(model.getMethodId()) || "default".equals(model.getMethodId())) { @@ -2719,12 +2734,7 @@ public class PALRepositoryQueryAPIManager { }).collect(Collectors.toList()); - String[] spilt=departId.split(","); - JSONArray orgIdList=new JSONArray(); - for(String ele:spilt){ - orgIdList.add(ele); - } Set tempOrgList = new HashSet<>(); if (orgIdList.size() > 0) { @@ -2763,12 +2773,7 @@ public class PALRepositoryQueryAPIManager { } - String[] method=methods.split(","); - JSONArray methodIdList=new JSONArray(); - for(String ele:method){ - methodIdList.add(ele); - } if (methodIdList.size() > 0) { list = list.stream().filter(model -> { @@ -2788,6 +2793,21 @@ public class PALRepositoryQueryAPIManager { } + + // 先过滤掉空的架构与空的文件夹 + list = list.stream().filter(model -> { + boolean flag = true; + + if ("process.framework".equals(model.getMethodId()) || "default".equals(model.getMethodId())) { + flag = this.filterEmptyMoldel(model.getWsId(), model.getVersionId()); + } + return flag; + }).collect(Collectors.toList());*/ + + // 架构过滤 + if (orgIdList.size() > 0 || methodIdList.size() > 0) { + list = PALFrameworkFilterUtil2.filter(list, orgIdList, methodIdList); + } for (PALRepositoryModel model : list) { JSONObject object = new JSONObject(); @@ -5521,7 +5541,7 @@ public class PALRepositoryQueryAPIManager { public boolean hasAccessPortalDesignerPerm(UserContext uc, PALRepositoryModel model) { String newBoName = "BO_ACT_PUBLISH_PERM_SCOPE"; - BO bo = SDK.getBOAPI().query(newBoName).addQuery("PALVERSIONID=", model.getVersionId()).detail(); + BO bo = SDK.getBOAPI().query(newBoName).addQuery("PALVERSIONID=", model.getId()).detail(); if (bo == null) { return false; }