diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyAftercompletion.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyAftercompletion.java new file mode 100644 index 00000000..fabff3cf --- /dev/null +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyAftercompletion.java @@ -0,0 +1,56 @@ +package com.actionsoft.apps.coe.pal.publisher.event; + +import com.actionsoft.bpms.bo.engine.BO; +import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext; +import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener; +import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListenerInterface; +import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance; +import com.actionsoft.bpms.commons.database.RowMap; +import com.actionsoft.bpms.util.DBSql; +import com.actionsoft.sdk.local.SDK; + +import java.sql.Connection; + +public class ApplyAftercompletion extends ExecuteListener implements ExecuteListenerInterface { + + @Override + public void execute(ProcessExecutionContext ctx) throws Exception { + Connection conn = DBSql.open(); + String processInstId = ctx.getTaskInstance().getProcessInstId(); + String str = "SELECT * FROM WFC_PROCESS WHERE ID=" +"'"+processInstId+"'"; + RowMap map = DBSql.getMap(str); + //标题 + String processtitle = map.getString("PROCESSTITLE"); + //人员 + String applyusername = map.getString("APPLYUSERNAME"); + //时间 + String applydate = map.getString("APPLYDATE"); + + System.out.println("标题为:====================="+processtitle+"-"+applyusername+"-"+applydate); + + String title =processtitle+"-"+applyusername+"-"+applydate; + String str1 = "UPDATE WFC_PROCESS SET PROCESSTITLE ='"+title+"' WHERE ID=" +"'"+processInstId+"'"; + + int update = DBSql.update(conn, str1); + System.out.println("修改======"+update); + String str2 = "SELECT * FROM WFC_PROCESS WHERE ID=" +"'"+processInstId+"'"; + RowMap map2 = DBSql.getMap(str2); + conn.close(); + + System.out.println(map2); + String processtitle2 = map2.getString("PROCESSTITLE"); + System.out.println("标题为:======="+processtitle2); + + BO bo = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").addQuery("BINDID=", processInstId).detail(); + String process_title = bo.getString("PROCESS_TITLE"); + System.out.println("标题========"+process_title); + /* bo.set("PROCESS_TITLE","流程发布"); + int i = SDK.getBOAPI().update("BO_ACT_COE_PUBLISH", bo); + System.out.println(i); + BO bo2 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").addQuery("BINDID=", processInstId).detail(); + String process_title2 = bo2.getString("PROCESS_TITLE"); + System.out.println("标题========"+process_title2);*/ + + } + +} \ No newline at end of file diff --git a/com.actionsoft.apps.coe.pal/template/page/main.htm b/com.actionsoft.apps.coe.pal/template/page/main.htm index d7fb9a11..ed56b628 100644 --- a/com.actionsoft.apps.coe.pal/template/page/main.htm +++ b/com.actionsoft.apps.coe.pal/template/page/main.htm @@ -13,4 +13,4 @@ var mainType = "<#mainType>"; var uid = "<#uid>"; var wHref = "./w"; - var jdHref = "./jd";