能力申请增加当前节点信息
This commit is contained in:
parent
48c80cb357
commit
0e4c61cda1
|
@ -28,12 +28,15 @@ import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||||
import io.renren.modules.sys.service.SysDeptService;
|
import io.renren.modules.sys.service.SysDeptService;
|
||||||
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.activiti.engine.HistoryService;
|
import org.activiti.engine.HistoryService;
|
||||||
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.history.HistoricProcessInstance;
|
import org.activiti.engine.history.HistoricProcessInstance;
|
||||||
|
import org.activiti.engine.task.Task;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -60,6 +63,9 @@ import java.util.stream.Collectors;
|
||||||
@Api(tags = "能力申请表单")
|
@Api(tags = "能力申请表单")
|
||||||
public class TAbilityApplicationController {
|
public class TAbilityApplicationController {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationController.class);
|
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationController.class);
|
||||||
|
|
||||||
|
@Value("${project.place}")
|
||||||
|
private Integer projectPlace;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TAbilityApplicationService tAbilityApplicationService;
|
private TAbilityApplicationService tAbilityApplicationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -76,8 +82,10 @@ public class TAbilityApplicationController {
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
@Autowired
|
@Autowired
|
||||||
protected HistoryService historyService;
|
protected HistoryService historyService;
|
||||||
@Value("${project.place}")
|
@Autowired
|
||||||
private Integer projectPlace;
|
private TaskService taskService;
|
||||||
|
@Autowired
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -264,6 +272,23 @@ public class TAbilityApplicationController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tAbilityApplicationDTOList.get(0).getApproveStatus().equals("审核中")) { // 若处于审核中时 增加当前节点信息
|
||||||
|
Task task = taskService.createTaskQuery().processInstanceId(tAbilityApplicationDTOList.get(0).getInstanceId()).active().includeProcessVariables().singleResult();
|
||||||
|
if (task != null && StringUtils.isNotEmpty(task.getId()) && StringUtils.isNumeric(task.getAssignee())) {
|
||||||
|
HistoryDetailDTO detailDTO = new HistoryDetailDTO();
|
||||||
|
detailDTO.setId(task.getId());
|
||||||
|
detailDTO.setAssignee(sysUserService.get(Long.valueOf(task.getAssignee())).getRealName());
|
||||||
|
detailDTO.setActivityName(task.getName());
|
||||||
|
detailDTO.setActivityType("");
|
||||||
|
detailDTO.setStartTime(task.getCreateTime());
|
||||||
|
detailDTO.setEndTime(null);
|
||||||
|
detailDTO.setDurationInSeconds(null);
|
||||||
|
detailDTO.setExecutionId(task.getExecutionId());
|
||||||
|
detailDTO.setProcessDefinitionId(task.getProcessDefinitionId());
|
||||||
|
taskHandleDetailInfo.add(detailDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean finalBackToFirst = backToFirst;
|
boolean finalBackToFirst = backToFirst;
|
||||||
return new HashMap<String, Object>() {
|
return new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue