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 140e9edf..0d2db8e5 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/event/PublishFormBeforeSaveEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java index a8900c1c..d816bc41 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java @@ -13,7 +13,9 @@ import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext; import com.actionsoft.bpms.bpmn.engine.listener.InterruptListener; import com.actionsoft.bpms.bpmn.engine.listener.InterruptListenerInterface; import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst; +import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.bpms.commons.mvc.view.ResponseObject; +import com.actionsoft.bpms.util.DBSql; import com.actionsoft.bpms.util.UtilString; import com.actionsoft.exception.AWSException; import com.actionsoft.exception.BPMNError; @@ -41,11 +43,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int @Override public boolean execute(ProcessExecutionContext param) throws Exception { - - - List gridData=SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(param.getProcessInstance().getId()).list(); - + String bindid=param.getProcessInstance().getId(); StringBuilder sb = new StringBuilder(); StringBuilder sb1 = new StringBuilder(); if (gridData.size() > 0) { @@ -70,12 +69,26 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int //获取关联表单模型id List> fileElements; if(UtilString.isNotEmpty(relationFileId)){ + RowMap rerowMap= DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=?",relationFileId); + if(relationFileId.contains(",")){ splitRelationFileId=relationFileId.split(","); fileElements = CoeDesignerUtil.getShapeMessageJson4(splitRelationFileId[0]); + + RowMap rowMap=DBSql.getMap("SELECT T1.* FROM BO_ACT_COE_PUBLISH_N T1 LEFT JOIN APP_ACT_COE_PAL_REPOSITORY T2 on T1.PUBLISHFILEID=T2.ID WHERE T1.BINDID=? AND T1.PUBLISHFILEID=? AND T2.ISPUBLISH=0",bindid,splitRelationFileId[0]); + if(rowMap==null) { + sb.append("模型名称:").append(rerowMap.getString("PLNAME")).append("需进行选择发布!").append("
"); + } + }else{ fileElements = CoeDesignerUtil.getShapeMessageJson4(relationFileId); + + RowMap rowMap=DBSql.getMap("SELECT T1.* FROM BO_ACT_COE_PUBLISH_N T1 LEFT JOIN APP_ACT_COE_PAL_REPOSITORY T2 on T1.PUBLISHFILEID=T2.ID WHERE T1.BINDID=? AND T1.PUBLISHFILEID=? AND T2.ISPUBLISH=0",bindid,relationFileId); + if(rowMap==null) { + sb.append("模型名称:").append(rerowMap.getString("PLNAME")).append("需进行选择发布!").append("
"); + } } + for (Map shape : fileElements) { String tempShapeId = shape.get("id").toString(); @@ -89,7 +102,7 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int } if(list2.size()==0){ - sb.append("模型名称:").append(shape.get("plName")).append("
").append("节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append(","); + sb.append("模型名称:").append(shape.get("plName")).append("[").append("节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append("]").append(","); } } diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js index 4c85b4fd..a50aac51 100644 --- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js +++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js @@ -516,7 +516,6 @@ function showlist(data, type, pageNumber, start){ // 加载数据 var html = ''; for (var i = 0, s = start; i < pageLimit; i++, s++) { - debugger; var curr; if ((curr = data[s - 1]) != undefined) { var fileName = curr.publishFileName + ' V' + curr.fileVersion; @@ -892,8 +891,9 @@ function addProcess(type) { } function publishFlowCheck(data) { + debugger; var ids = []; - for (var i = 0; i < data.length; i++) { + for (var i = 0; i < data.length; i++) {debugger var temp = data[i]; if ((temp.methodId == 'control.policy' || temp.methodId == 'data.form' || temp.methodId.indexOf('process.') > -1) && temp.methodId != 'default') { ids.push(temp.publishFileId); @@ -924,31 +924,6 @@ function publishFlowCheck(data) { }); - //伴随发布功能 - var param = { - sid : sid, - cmd : "com.actionsoft.apps.coe.pal.publisher_get_RelevancyPublish", - wsId: wsId, - uuids: JSON.stringify(ids), - bindid:$("#processInstId").val() - } - $.ajax({ - url : "./jd", - type : "POST", - data : param, - success : function(r) { - debugger; - if (r.result == 'ok') { - if(r.data.result=='error'){ - $('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', ''); - $.simpleAlert(r.data.sb,"error",3000); - return; - } - - } - } - }); - }