Merge branch 'dev' into docker_package
This commit is contained in:
commit
2dc4a978ed
|
@ -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.codehaus.jackson.map.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -156,6 +158,14 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
}
|
||||
}
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(delegateTask.getId()).active().singleResult();
|
||||
if (task != null && StringUtils.isNotEmpty(task.getAssignee())
|
||||
&& StringUtils.isNotEmpty(demandDataDTO.getApplyUserId())
|
||||
&& demandDataDTO.getApplyUserId().equals(task.getAssignee())) {
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "发起人为审批人,默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
|
|
Loading…
Reference in New Issue