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 7250ae72..d5bf5003 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 @@ -3700,11 +3700,20 @@ public class PALRepositoryQueryAPIManager { if(object.getBoolean("folder")==false){ - String sessionId = new SSOUtil().registerClientSessionNoPassword(model.getCreateUser(), LoginConst.DEFAULT_LANG, "127.0.0.1", LoginConst.DEVICE_PC); - String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+model.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+""; + //判断数据库用户是否注销状态 + UserModel userModel=SDK.getORGAPI().getUser(model.getCreateUser()); + boolean isclosed=userModel.isClosed(); + if(isclosed==false){ + String sessionId = new SSOUtil().registerClientSessionNoPassword(model.getCreateUser(), LoginConst.DEFAULT_LANG, "127.0.0.1", LoginConst.DEVICE_PC); + + String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+model.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+""; + + object.put("url",url); + }else{ + object.put("url",""); + } - object.put("url",url); } 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 840f035c..c621dec9 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 @@ -2261,35 +2261,47 @@ public class CoeProcessLevelUtil { //如果是关联属性,增加链接功能 if(attributeModel.getType().equals("relation")){ String appUrl; - String sessionId = new SSOUtil().registerClientSessionNoPassword(plModel.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); - if(JSONObject.parseObject(property.getPropertyValue())!=null){ - String relationFileId = JSONObject.parseObject(property.getPropertyValue()).get("relationFileId").toString(); - //String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+relationFileId+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+""; - PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid); + //判断数据库用户是否注销状态 + UserModel userModel=SDK.getORGAPI().getUser(plModel.getCreateUser()); + boolean isclosed=userModel.isClosed(); + if(isclosed==false){ - String taskId=""; - if (model != null) { - if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册 - taskId=getLastPublishTaskIdByModelId(model.getId()); + String sessionId = new SSOUtil().registerClientSessionNoPassword(plModel.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); + + if(JSONObject.parseObject(property.getPropertyValue())!=null){ + String relationFileId = JSONObject.parseObject(property.getPropertyValue()).get("relationFileId").toString(); + //String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+relationFileId+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+""; + + 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; + 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)+"..."; + //判断如果关联属性是岗位,多个岗位显示为... + 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); } - appUrl=""+inputValue+""; + }else{ + appUrl=""+inputValue+""; attribute.put("value", appUrl); } + }else{ attribute.put("value", inputValue); }