发布流程选择后带出相关支持文件链接|发布流程结束后事件增加关闭数据库链接代码
This commit is contained in:
parent
9b3e75e44c
commit
da0b82a8a6
Binary file not shown.
@ -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<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+id+"' and ATTRID='related_support_files'");
|
||||
/*List<RowMap> 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<relatedRowMap.size();j++){
|
||||
JSONObject jb = new JSONObject();
|
||||
@ -2997,9 +2999,30 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
jb.put("relatedUrl",url);
|
||||
jsonArray1.add(jb.toJSONString());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//获取使用中版本的相关支持文件
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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<Map<String, Object>> shapeMessageJson4 =
|
||||
@ -3237,7 +3260,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
|
||||
//相关/支持文件数据
|
||||
JSONArray jsonArray1=new JSONArray();
|
||||
List<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+changeBo.getString("CHANGEDFILENAMENEW")+"' and ATTRID='related_support_files'");
|
||||
/*List<RowMap> 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<relatedRowMap.size();b++){
|
||||
JSONObject jb = new JSONObject();
|
||||
@ -3249,7 +3272,29 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
jsonArray1.add(jb.toJSONString());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//获取使用中版本的相关支持文件
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+ stopBo.getString("STOPFILEID")+"' and ATTRID='related_support_files'");
|
||||
/*List<RowMap> 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<relatedRowMap.size();b++){
|
||||
JSONObject jb = new JSONObject();
|
||||
@ -3528,7 +3573,30 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
jsonArray1.add(jb.toJSONString());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
//获取使用中的相关支持文件
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+model2.getId()+"' and ATTRID='related_support_files'");
|
||||
/*List<RowMap> 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<relatedRowMap.size();j++){
|
||||
@ -4012,9 +4080,30 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
jsonArray1.add(jb.toJSONString());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//获取使用中版本的相关支持文件
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+plId+"' and ATTRID='related_support_files'");
|
||||
/*List<RowMap> 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<relatedRowMap.size();i++){
|
||||
JSONObject jb = new JSONObject();
|
||||
@ -5419,10 +5508,31 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
jb.put("relatedUrl",url);
|
||||
jsonArray1.add(jb.toJSONString());
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
//获取使用中版本的相关支持文件
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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();
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user