diff --git a/renren-admin/src/main/java/io/renren/modules/demanData/listener/DemandDataListener.java b/renren-admin/src/main/java/io/renren/modules/demanData/listener/DemandDataListener.java index 671af9ee..65624750 100644 --- a/renren-admin/src/main/java/io/renren/modules/demanData/listener/DemandDataListener.java +++ b/renren-admin/src/main/java/io/renren/modules/demanData/listener/DemandDataListener.java @@ -168,11 +168,6 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti && StringUtils.isNotEmpty(demandDataDTO.getApplyUserId()) && demandDataDTO.getApplyUserId().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(1000l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/listener/CommentListener.java b/renren-admin/src/main/java/io/renren/modules/demandComment/listener/CommentListener.java index 76cf5066..b60a738c 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/listener/CommentListener.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/listener/CommentListener.java @@ -5,6 +5,7 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import io.renren.common.annotation.ActivitiNoticeOperation; +import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.demandComment.dto.TDemandCommentDTO; import io.renren.modules.demandComment.service.TDemandCommentService; import io.renren.modules.sys.dto.SysDeptDTO; @@ -157,11 +158,8 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit && StringUtils.isNotEmpty(tDemandCommentDTO.getCreator().toString()) && tDemandCommentDTO.getCreator().toString().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java index 25647b04..d84faf6e 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java @@ -228,11 +228,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti && StringUtils.isNotEmpty(abilityApplicationDTO.getUserId()) && abilityApplicationDTO.getUserId().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/DataCenterListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/DataCenterListener.java index ef59a14b..3545f91f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/DataCenterListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/DataCenterListener.java @@ -5,6 +5,7 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import io.renren.common.annotation.ActivitiNoticeOperation; +import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.service.ResourceService; @@ -140,11 +141,8 @@ public class DataCenterListener implements TaskListener, ExecutionListener, Acti && StringUtils.isNotEmpty(abilityApplicationDTO.getUserId()) && abilityApplicationDTO.getUserId().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java index 789ced07..71f5de08 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java @@ -208,11 +208,8 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/DataCenterListenerV2.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/DataCenterListenerV2.java index 70f8e050..918a5f81 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/DataCenterListenerV2.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/DataCenterListenerV2.java @@ -1,6 +1,7 @@ package io.renren.modules.processForm.listener.v2; import io.renren.common.annotation.ActivitiNoticeOperation; +import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysRoleDTO; @@ -110,11 +111,8 @@ public class DataCenterListenerV2 implements TaskListener, ExecutionListener, Ac && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/listener/ResourceUndercarriageListener.java b/renren-admin/src/main/java/io/renren/modules/resource/listener/ResourceUndercarriageListener.java index 2745f7d8..290304e5 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/listener/ResourceUndercarriageListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/listener/ResourceUndercarriageListener.java @@ -6,6 +6,7 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import io.renren.common.annotation.ActivitiNoticeOperation; +import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.entity.ResourceEntityDelFlag; import io.renren.modules.resource.service.ResourceService; @@ -149,11 +150,8 @@ public class ResourceUndercarriageListener implements TaskListener, ExecutionLis && StringUtils.isNotEmpty(re.getCreator().toString()) && re.getCreator().toString().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } } 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 ee74117d..bcbc252c 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 @@ -6,6 +6,7 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import io.renren.common.annotation.ActivitiNoticeOperation; +import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.processForm.service.ApiGatewayService; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.entity.ResourceEntityDelFlag; @@ -227,11 +228,8 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A && StringUtils.isNotEmpty(resourceMountApplyDTO.getUserId()) && resourceMountApplyDTO.getUserId().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); - try { - Thread.sleep(100l); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); + taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); } }