Merge branch 'dev' into docker_package

This commit is contained in:
wangliwen 2022-07-07 10:07:56 +08:00
commit 2dc4a978ed
1 changed files with 10 additions and 0 deletions

View File

@ -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) {