diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index f454f1b6..59559a11 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java index c846abe5..5677459b 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java @@ -14,6 +14,8 @@ import java.util.stream.Collectors; import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache; import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; +import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache; +import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel; import com.actionsoft.apps.coe.pal.publisher.constant.FilePermConstant; import com.actionsoft.bpms.commons.login.constant.LoginConst; import com.actionsoft.bpms.server.SSOUtil; @@ -2986,7 +2988,7 @@ public class ProcessPublishWeb extends ActionWeb { //相关/支持文件数据 JSONArray jsonArray1=new JSONArray(); - List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+id+"' and ATTRID='related_support_files'"); + /*List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+id+"' and ATTRID='related_support_files'"); if(relatedRowMap.size()>0){ for(int j=0;j relationList = DesignerShapeRelationCache.getListByAttrId(id, "", "related_support_files"); + if (relationList.size() > 0) { + for (DesignerShapeRelationModel relation : relationList) { + JSONObject jb = new JSONObject(); + String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + List models = PALRepositoryCache.getByVersionId(relationFileId); + if (models != null && models.size() > 0) { + for(PALRepositoryModel oneModel:models){ + if(oneModel.isUse()==true){ + String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ oneModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+_uc.getSessionId() + "&browserId=" + UUIDGener.getObjectId(); + jb.put("relatedName",oneModel.getName()); + jb.put("relatedUrl",url); + jsonArray1.add(jb.toJSONString()); + } + } + } } } + + obj.put("relatedData", jsonArray1); // List> shapeMessageJson4 = @@ -3237,7 +3260,7 @@ public class ProcessPublishWeb extends ActionWeb { //相关/支持文件数据 JSONArray jsonArray1=new JSONArray(); - List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+changeBo.getString("CHANGEDFILENAMENEW")+"' and ATTRID='related_support_files'"); + /*List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+changeBo.getString("CHANGEDFILENAMENEW")+"' and ATTRID='related_support_files'"); if(relatedRowMap.size()>0){ for(int b=0;b relationList = DesignerShapeRelationCache.getListByAttrId(changeBo.getString("CHANGEDFILENAMENEW"), "", "related_support_files"); + if (relationList.size() > 0) { + for (DesignerShapeRelationModel relation : relationList) { + JSONObject jb = new JSONObject(); + String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + List models = PALRepositoryCache.getByVersionId(relationFileId); + if (models != null && models.size() > 0) { + for(PALRepositoryModel oneModel:models){ + if(oneModel.isUse()==true){ + String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ oneModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+_uc.getSessionId() + "&browserId=" + UUIDGener.getObjectId(); + jb.put("relatedName",oneModel.getName()); + jb.put("relatedUrl",url); + jsonArray1.add(jb.toJSONString()); + } + } + } + } } + + + obj.put("relatedData", jsonArray1); @@ -3516,7 +3561,7 @@ public class ProcessPublishWeb extends ActionWeb { //相关/支持文件数据 JSONArray jsonArray1=new JSONArray(); - List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+ stopBo.getString("STOPFILEID")+"' and ATTRID='related_support_files'"); + /*List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+ stopBo.getString("STOPFILEID")+"' and ATTRID='related_support_files'"); if(relatedRowMap.size()>0){ for(int b=0;b relationList = DesignerShapeRelationCache.getListByAttrId(stopBo.getString("STOPFILEID"), "", "related_support_files"); + if (relationList.size() > 0) { + for (DesignerShapeRelationModel relation : relationList) { + JSONObject jb = new JSONObject(); + String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + List models = PALRepositoryCache.getByVersionId(relationFileId); + if (models != null && models.size() > 0) { + for(PALRepositoryModel oneModel:models){ + if(oneModel.isUse()==true){ + String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ oneModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+_uc.getSessionId() + "&browserId=" + UUIDGener.getObjectId(); + jb.put("relatedName",oneModel.getName()); + jb.put("relatedUrl",url); + jsonArray1.add(jb.toJSONString()); + } + } + } + } } + obj.put("relatedData", jsonArray1); @@ -3999,7 +4067,7 @@ public class ProcessPublishWeb extends ActionWeb { //相关/支持文件 JSONArray jsonArray1=new JSONArray(); - List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+model2.getId()+"' and ATTRID='related_support_files'"); + /*List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+model2.getId()+"' and ATTRID='related_support_files'"); Map map=new HashMap(); if(relatedRowMap.size()>0){ for(int j=0;j relationList = DesignerShapeRelationCache.getListByAttrId(model2.getId(), "", "related_support_files"); + if (relationList.size() > 0) { + for (DesignerShapeRelationModel relation : relationList) { + JSONObject jb = new JSONObject(); + String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + List modelversion = PALRepositoryCache.getByVersionId(relationFileId); + if (modelversion != null && modelversion.size() > 0) { + for(PALRepositoryModel oneModel:modelversion){ + if(oneModel.isUse()==true){ + String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ oneModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+_uc.getSessionId() + "&browserId=" + UUIDGener.getObjectId(); + jb.put("relatedName",oneModel.getName()); + jb.put("relatedUrl",url); + jsonArray1.add(jb.toJSONString()); + } + } + } + } } + + object.put("relatedData", jsonArray1); @@ -5407,7 +5496,7 @@ public class ProcessPublishWeb extends ActionWeb { ResponseObject ro = ResponseObject.newOkResponse(); //相关/支持文件 JSONArray jsonArray1=new JSONArray(); - List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+plId+"' and ATTRID='related_support_files'"); + /*List relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+plId+"' and ATTRID='related_support_files'"); if(relatedRowMap.size()>0){ for(int i=0;i relationList = DesignerShapeRelationCache.getListByAttrId(plId, "", "related_support_files"); + if (relationList.size() > 0) { + for (DesignerShapeRelationModel relation : relationList) { + JSONObject jb = new JSONObject(); + String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + List models = PALRepositoryCache.getByVersionId(relationFileId); + if (models != null && models.size() > 0) { + for(PALRepositoryModel oneModel:models){ + if(oneModel.isUse()==true){ + String sessionId = new SSOUtil().registerClientSessionNoPassword("admin", LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); + String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ oneModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId + "&browserId=" + UUIDGener.getObjectId(); + jb.put("relatedName",oneModel.getName()); + jb.put("relatedUrl",url); + jsonArray1.add(jb.toJSONString()); + } + } + } + } + } + - } ro.put("relatedData",jsonArray1); return ro.toString(); } diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java index 97bdca88..e4ba8e2c 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java @@ -261,11 +261,6 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme String fileId = boN.getString("PUBLISHFILEID"); PALRepository palRepository=new PALRepository(); palRepository.updateRepositoryExtAll(fileId,"","","","","1",""); - /*int countEXT5=DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='" + fileId + "'"); - if(countEXT5==0){ - System.out.println("发布新增表模型id为="+fileId); - }*/ - /** diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java index 36ba33cf..0bfa8966 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java @@ -99,13 +99,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute @Override public void execute(ProcessExecutionContext ext) throws Exception { - //用户点击确认发布按钮后进行触发推送任务 Boolean isConfirmRelease = SDK.getTaskAPI().isChoiceActionMenu(ext.getTaskInstance(), "确认发布"); - Connection open = DBSql.open(); try { - - if(isConfirmRelease==true){ ProcessInstance boProcessInstance = SDK.getProcessAPI() .createBOProcessInstance("obj_7946c848674f422fbe2817ad5d047337", ext.getUserContext().getUID(), "OA任务状态记录"); @@ -120,7 +116,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute @Override public void run() { try { - ProcessData(ext,open); + ProcessData(ext); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -177,7 +173,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } - public void ProcessData(ProcessExecutionContext processExecutionContext,Connection open) throws Exception { + public void ProcessData(ProcessExecutionContext processExecutionContext) throws Exception { + Connection open = DBSql.open(); System.err.println(processExecutionContext.getTaskInstance().getTitle() + "_推送文件开始========>"); // http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219 /** @@ -852,6 +849,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } catch (Exception e) { e.printStackTrace(); } finally { + DBSql.close(open); } } }