Merge branch 'dev' into docker_package
This commit is contained in:
commit
d568739dfa
|
@ -162,7 +162,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(demandDataDTO.getApplyUserId())
|
||||
&& demandDataDTO.getApplyUserId().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "发起人为审批人,默认通过");
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.activiti.engine.TaskService;
|
|||
import org.activiti.engine.delegate.*;
|
||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -220,6 +221,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
return;
|
||||
}
|
||||
});
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(abilityApplicationDTO.getUserId())
|
||||
&& abilityApplicationDTO.getUserId().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
}
|
||||
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.activiti.engine.TaskService;
|
|||
import org.activiti.engine.delegate.*;
|
||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -134,5 +135,13 @@ public class DataCenterListener implements TaskListener, ExecutionListener, Acti
|
|||
}
|
||||
});
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(abilityApplicationDTO.getUserId())
|
||||
&& abilityApplicationDTO.getUserId().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ import org.activiti.engine.TaskService;
|
|||
import org.activiti.engine.delegate.*;
|
||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -202,6 +204,13 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
|
|||
return;
|
||||
}
|
||||
});
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class))
|
||||
&& delegateTask.getVariable("creator", String.class).equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
}
|
||||
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
|
|
|
@ -13,6 +13,8 @@ import org.activiti.engine.TaskService;
|
|||
import org.activiti.engine.delegate.*;
|
||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -101,5 +103,13 @@ public class DataCenterListenerV2 implements TaskListener, ExecutionListener, Ac
|
|||
logger.error("未查到 {} 对应 " + roleName, bigDateDeptName);
|
||||
}
|
||||
// TODO 批量里存在免批?或全为免批的情况?
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class))
|
||||
&& delegateTask.getVariable("creator", String.class).equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ import org.activiti.engine.delegate.DelegateExecution;
|
|||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -141,6 +143,14 @@ public class ResourceUndercarriageListener implements TaskListener, ExecutionLis
|
|||
} else {
|
||||
defaultUser(delegateTask.getId(), roleDTO);
|
||||
}
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(re.getCreator().toString())
|
||||
&& re.getCreator().toString().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,8 @@ import org.activiti.engine.TaskService;
|
|||
import org.activiti.engine.delegate.*;
|
||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -214,5 +216,13 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
logger.error("未查到大数据部门对应 " + roleName);
|
||||
}
|
||||
}
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(resourceMountApplyDTO.getUserId())
|
||||
&& resourceMountApplyDTO.getUserId().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue