权限阅览提示界面查询方法修改获取模型ID

This commit is contained in:
zhaol 2025-01-21 14:02:07 +08:00
parent 40bd9f8ea4
commit 7729306a11
3 changed files with 40 additions and 14 deletions

View File

@ -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;

View File

@ -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<PALRepositoryModel> 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<String> 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;
}