发布提交
This commit is contained in:
parent
53f4bdf8c0
commit
4f0d9f0cbe
Binary file not shown.
@ -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<BO> 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<Map<String, Object>> 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("</br>");
|
||||
}
|
||||
|
||||
}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("</br>");
|
||||
}
|
||||
}
|
||||
|
||||
for (Map<String, Object> 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("</br>").append("节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append(",");
|
||||
sb.append("模型名称:").append(shape.get("plName")).append("[").append("节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append("]").append(",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user