...
This commit is contained in:
parent
5b1c97b802
commit
6d0aec6686
|
@ -13,24 +13,18 @@ import io.renren.modules.sys.service.SysDeptService;
|
||||||
import io.renren.modules.sys.service.SysRoleService;
|
import io.renren.modules.sys.service.SysRoleService;
|
||||||
import io.renren.modules.sys.service.SysRoleUserService;
|
import io.renren.modules.sys.service.SysRoleUserService;
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import org.activiti.engine.HistoryService;
|
|
||||||
import org.activiti.engine.ProcessEngine;
|
|
||||||
import org.activiti.engine.ProcessEngines;
|
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.delegate.*;
|
import org.activiti.engine.delegate.*;
|
||||||
import org.activiti.engine.delegate.event.ActivitiEvent;
|
import org.activiti.engine.delegate.event.ActivitiEvent;
|
||||||
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
import org.activiti.engine.delegate.event.ActivitiEventListener;
|
||||||
import org.activiti.engine.history.HistoricTaskInstance;
|
|
||||||
import org.activiti.engine.task.Task;
|
|
||||||
import org.activiti.engine.task.TaskQuery;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门动态审批人
|
* 部门动态审批人
|
||||||
|
@ -146,6 +140,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
logger.error("第二级别审批仍然为 " + bigDateDeptName);
|
logger.error("第二级别审批仍然为 " + bigDateDeptName);
|
||||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "默认通过");
|
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "默认通过");
|
||||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||||
|
endTake(delegateTask.getVariables());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("表单内单位名称:" + abilityApplicationDTO.getUnit());
|
logger.error("表单内单位名称:" + abilityApplicationDTO.getUnit());
|
||||||
|
@ -167,5 +162,15 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
logger.error("未查到该部门对应的 " + roleName);
|
logger.error("未查到该部门对应的 " + roleName);
|
||||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<ResourceDTO> resourceDTOOptional = Optional.ofNullable(resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId())));
|
||||||
|
resourceDTOOptional.ifPresent(resource -> {
|
||||||
|
if ("免批申请".equals(resource.getShareCondition())) { // 针对免批资源申请
|
||||||
|
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||||
|
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||||
|
endTake(delegateTask.getVariables());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue