diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTasAfterkComplete.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTasAfterkComplete.java index 2f50a1f9..5bf13220 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTasAfterkComplete.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTasAfterkComplete.java @@ -43,18 +43,13 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi System.err.println("---------生成编号------------"); String processInstId = ctx.getProcessInstance().getId(); // by bzp 文件编号生成 - - String sql = "SELECT * FROM BO_ACT_COE_PUBLISH_N WHERE BINDID = '" + processInstId + "'"; - List maps = DBSql.getMaps(sql); - for (RowMap rowMap : maps) { - String number = rowMap.getString("PUBLISH_NUMBER"); + try { + new ProcesNumberUtil().getNumber(processInstId); + } catch (Exception e) { + // TODO: handle exception } - - new ProcesNumberUtil().getNumber(processInstId); SDK.getLogAPI().consoleInfo("[任务事件]任务结束,涉及流程状态变为审批中-->" + ctx.getTaskInstance().getTitle()); ProcessStatusAPIManager.getInstance().batchUpdateApprovalStatus(ctx.getTaskInstance().getProcessInstId(), true); - - //任务提交后重新生成手册 List bolistN = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(processInstId).list(); List bolistC = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_C).bindId(processInstId).list(); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTaskAfterCreated.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTaskAfterCreated.java index 72e1f8ee..0667aab0 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTaskAfterCreated.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/ApplyTaskAfterCreated.java @@ -12,6 +12,7 @@ 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.listener.ListenerConst; +import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance; import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.bpms.server.UserContext; import com.actionsoft.bpms.util.DBSql; @@ -28,7 +29,8 @@ public class ApplyTaskAfterCreated extends ExecuteListener implements ExecuteLis @Override public void execute(ProcessExecutionContext ctx) throws Exception { - if(null!=ctx.getTaskInstance()&&!"00000000-0000-0000-0000-000000000000".equals(ctx.getTaskInstance().getParentTaskInstId())) { + TaskInstance taskInstance = ctx.getTaskInstance(); + if((null!=ctx.getTaskInstance()&&!"00000000-0000-0000-0000-000000000000".equals(ctx.getTaskInstance().getParentTaskInstId())||taskInstance.getTitle().contains("撤销重办"))) { SDK.getLogAPI().consoleInfo("[任务创建]任务创建,涉及流程状态取消审批中状态,退回原有状态" + ctx.getTaskInstance().getTitle()); ProcessStatusAPIManager.getInstance().batchUpdateApprovalStatus(ctx.getTaskInstance().getProcessInstId(), false); } diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java index 5d43397e..1ce54b76 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java @@ -658,6 +658,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList bo.set("TITLE", processInstance.getTitle()); bo.set("PROCESSID", processInstance.getId()); bo.set("USER_ID", user); + bo.set("USERDEP", SDK.getORGAPI().getUser(user).getDepartmentId()); bo.set("DATAID", dataid); bo.set("RESULT", status); bo.set("SENDTYPE", "1");