diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java index 624b98fb..b5088653 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java @@ -52,7 +52,15 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A @Override public void notify(DelegateExecution execution) throws Exception { + logger.error("----------------------进入审批通过节点---------------------------"); + final String eventName = execution.getEventName(); + switch (eventName) { + case EVENTNAME_TAKE: { + endTake(execution.getVariables()); + } + break; + } } @Override @@ -71,9 +79,9 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A case EVENTNAME_CREATE: // 创建当前审批节点事件 create(delegateTask, roleDTO); break; - case EVENTNAME_COMPLETE: - complete(delegateTask); - break; +// case EVENTNAME_COMPLETE: +// complete(delegateTask); +// break; default: logger.error("未处理该事件:" + eventName); } @@ -99,8 +107,25 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A return false; } + /** + * 进入最后结束节点 + * + * @param kv + */ + private void endTake(Map kv) { // 进入最后结束节点 + Gson gson = new Gson(); + JsonElement jsonElement = gson.toJsonTree(kv); + TResourceMountApplyDTO resourceMountApplyDTO = gson.fromJson(jsonElement, TResourceMountApplyDTO.class); + ResourceDTO re = resourceMountApplyDTO.getResourceDTO(); + if (re != null) { + re.setDelFlag(0); + resourceService.update(re); + } + } + /** * 流程结束,推送 + * * @param delegateTask */ private void complete(DelegateTask delegateTask) {