|
@@ -85,6 +85,7 @@ import org.flowable.task.api.TaskQuery; |
|
|
import org.flowable.task.api.history.HistoricTaskInstance; |
|
|
import org.flowable.task.api.history.HistoricTaskInstance; |
|
|
import org.flowable.task.service.history.NativeHistoricTaskInstanceQuery; |
|
|
import org.flowable.task.service.history.NativeHistoricTaskInstanceQuery; |
|
|
import org.flowable.variable.api.history.HistoricVariableInstance; |
|
|
import org.flowable.variable.api.history.HistoricVariableInstance; |
|
|
|
|
|
import org.flowable.variable.api.history.HistoricVariableInstanceQuery; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
@@ -137,8 +138,8 @@ public class TodoCenterManage { |
|
|
// 获取登录用户ID |
|
|
// 获取登录用户ID |
|
|
// long userId = LoginUserUtil.getUserId(); |
|
|
// long userId = LoginUserUtil.getUserId(); |
|
|
|
|
|
|
|
|
// Long userId = 381496L; |
|
|
|
|
|
Long userId = 6418616L; |
|
|
|
|
|
|
|
|
Long userId = 381496L; |
|
|
|
|
|
// Long userId = 6418616L; |
|
|
// Long userId = 61769799L; |
|
|
// Long userId = 61769799L; |
|
|
TaskQuery taskQuery = taskService.createTaskQuery(); |
|
|
TaskQuery taskQuery = taskService.createTaskQuery(); |
|
|
taskQuery.active().taskCandidateOrAssigned(String.valueOf(userId)).orderByTaskCreateTime().desc(); |
|
|
taskQuery.active().taskCandidateOrAssigned(String.valueOf(userId)).orderByTaskCreateTime().desc(); |
|
@@ -835,13 +836,27 @@ public class TodoCenterManage { |
|
|
* @return 流程进度及表单详情 |
|
|
* @return 流程进度及表单详情 |
|
|
*/ |
|
|
*/ |
|
|
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId) { |
|
|
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId) { |
|
|
HistoricProcessInstance instance = |
|
|
|
|
|
historyService.createHistoricProcessInstanceQuery().processInstanceId(instanceId).singleResult(); |
|
|
|
|
|
|
|
|
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery() |
|
|
|
|
|
.processInstanceId(instanceId).singleResult(); |
|
|
// 取表单及表单数据 |
|
|
// 取表单及表单数据 |
|
|
HistoricVariableInstance forms = historyService.createHistoricVariableInstanceQuery() |
|
|
HistoricVariableInstance forms = historyService.createHistoricVariableInstanceQuery() |
|
|
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_FORMS).singleResult(); |
|
|
|
|
|
List<HistoricVariableInstance> formDatas = |
|
|
|
|
|
historyService.createHistoricVariableInstanceQuery().processInstanceId(instanceId).list(); |
|
|
|
|
|
|
|
|
.processInstanceId(instanceId) |
|
|
|
|
|
.variableName(WflowGlobalVarDef.WFLOW_FORMS) |
|
|
|
|
|
.singleResult(); |
|
|
|
|
|
List<HistoricVariableInstance> formDatas = null; |
|
|
|
|
|
if (nodeId.equals("undefined")) { |
|
|
|
|
|
List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery().processInstanceId(instanceId).list(); |
|
|
|
|
|
formDatas = historyService |
|
|
|
|
|
.createHistoricVariableInstanceQuery() |
|
|
|
|
|
.executionIds(historicTaskInstances.stream().map(HistoricTaskInstance::getExecutionId).collect(Collectors.toSet())) |
|
|
|
|
|
.processInstanceId(instanceId) |
|
|
|
|
|
.list(); |
|
|
|
|
|
}else { |
|
|
|
|
|
formDatas = historyService |
|
|
|
|
|
.createHistoricVariableInstanceQuery() |
|
|
|
|
|
.processInstanceId(instanceId) |
|
|
|
|
|
.list(); |
|
|
|
|
|
} |
|
|
// 取节点设置 |
|
|
// 取节点设置 |
|
|
HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery() |
|
|
HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery() |
|
|
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); |
|
|
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); |
|
@@ -999,8 +1014,8 @@ public class TodoCenterManage { |
|
|
// 获取登录用户ID |
|
|
// 获取登录用户ID |
|
|
// long userId = LoginUserUtil.getUserId(); |
|
|
// long userId = LoginUserUtil.getUserId(); |
|
|
|
|
|
|
|
|
Long userId = 381496L; |
|
|
|
|
|
// Long userId = 6418616L; |
|
|
|
|
|
|
|
|
// Long userId = 381496L; |
|
|
|
|
|
Long userId = 6418616L; |
|
|
// Long userId = 61769799L; |
|
|
// Long userId = 61769799L; |
|
|
|
|
|
|
|
|
// 自定义sql查询所有已办的任务实例 |
|
|
// 自定义sql查询所有已办的任务实例 |
|
|