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 54e239be..600aaa64 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 @@ -4730,7 +4730,7 @@ public class PALRepositoryQueryAPIManager { * @param uuid * @return */ - public Map queryRepositoryAttributeById(String uuid) { + public static Map queryRepositoryAttributeById(String uuid) { Map result = new HashMap<>(); PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid); // 获取所有文件属性 diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java index c1ccd0e0..7894cf7b 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java @@ -855,7 +855,7 @@ public class DesignerRelationShapeWeb extends ActionWeb { } } macroLibraries.put("treeData", jsonArr_new.toString()); - }else if(attrId.equals("R_relevant_flies")){ + }else if(attrId.equals("R_relevant_flies")){//相关文件 for (int i = 0; i < objects.size(); i++) { JSONObject jsonObject = objects.getJSONObject(i); String isParent=jsonObject.getString("isParent"); @@ -882,8 +882,7 @@ public class DesignerRelationShapeWeb extends ActionWeb { } macroLibraries.put("treeData", jsonArr_new.toString()); - } else if(attrId.equals("support_files")) { - + } else if(attrId.equals("support_files")) { //支持文件 for (int i = 0; i < objects.size(); i++) { JSONObject jsonObject = objects.getJSONObject(i); String isParent=jsonObject.getString("isParent"); diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java index d581ecc6..a977f9df 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java @@ -2266,9 +2266,46 @@ public class CoeProcessLevelUtil { boolean isclosed=userModel.isClosed(); if(isclosed==false){ - String sessionId = new SSOUtil().registerClientSessionNoPassword(plModel.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); + Map jsonObjectMap=PALRepositoryQueryAPIManager.queryRepositoryAttributeById(uuid); - String relationFileId; + if(attributeModel.getKey().equals(jsonObjectMap.get(attributeModel.getKey()).get("attrId"))){ + String relationFileId; + + JSONArray jsonValue = jsonObjectMap.get(attributeModel.getKey()).getJSONArray("value"); + if(jsonValue.size()>0){ + + String sessionId = new SSOUtil().registerClientSessionNoPassword(plModel.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); + + relationFileId = jsonValue.getJSONObject(0).get("fileId").toString(); + + PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid); + String taskId=""; + if (model != null) { + if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册 + taskId=getLastPublishTaskIdByModelId(model.getId()); + } + } + String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid="+relationFileId+""+"&sid="+sessionId+"&taskId="+taskId; + + //判断如果关联属性是岗位,多个岗位显示为... + if(attributeModel.getKey().equals("post")){ + int lenth=inputValue.split(",").length-1; + if(lenth>=2){ + int index1=inputValue.indexOf(","); + int index2=inputValue.indexOf(",",index1+1); + inputValue=inputValue.substring(0,index2)+"..."; + } + } + appUrl=""+inputValue+""; + attribute.put("value", appUrl); + + }else{ + appUrl=""+inputValue+""; + attribute.put("value", appUrl); + } + } + + /*String relationFileId; if(JSONObject.parseObject(property.getPropertyValue())!=null){ relationFileId = JSONObject.parseObject(property.getPropertyValue()).get("relationFileId").toString(); if(relationFileId.contains(",")){ @@ -2298,7 +2335,7 @@ public class CoeProcessLevelUtil { } appUrl=""+inputValue+""; attribute.put("value", appUrl); - } + }*/ }else{ appUrl=""+inputValue+""; attribute.put("value", appUrl);