| | |
| | | .taskAssignee(user.getUserId()); |
| | | return query.count(); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户审批的任务 |
| | | * |
| | |
| | | public List<ComplaintDto> getUserHistoryTasks(@RequestBody AuditUser user) { |
| | | HistoryService historyService = processEngine.getHistoryService(); |
| | | Query query = historyService.createHistoricTaskInstanceQuery() |
| | | .processDefinitionKey("complaint") |
| | | .taskAssignee(user.getUserId()) |
| | | .orderByHistoricTaskInstanceStartTime() |
| | | .desc(); |
| | | .processDefinitionKey("complaint") |
| | | .taskAssignee(user.getUserId()) |
| | | .orderByHistoricTaskInstanceStartTime() |
| | | .desc(); |
| | | |
| | | List<HistoricTaskInstance> list = null; |
| | | if (user.getPage() != PageDto.DEFAULT_PAGE) { |
| | | list = query.listPage(user.getPage(), user.getRow()); |
| | | list = query.listPage((user.getPage() - 1) * user.getRow(), user.getRow()); |
| | | } else { |
| | | list = query.list(); |
| | | } |
| | |
| | | taskService.addComment(complaintDto.getTaskId(), processInstanceId, complaintDto.getAuditMessage()); |
| | | Map<String, Object> variables = new HashMap<String, Object>(); |
| | | variables.put("auditCode", complaintDto.getAuditCode()); |
| | | variables.put("currentUserId", complaintDto.getCurrentUserId()); |
| | | //taskService.setAssignee(complaintDto.getTaskId(),complaintDto.getCurrentUserId()); |
| | | //taskService.addCandidateUser(complaintDto.getTaskId(), complaintDto.getCurrentUserId()); |
| | | taskService.complete(complaintDto.getTaskId(), variables); |
| | | |
| | | ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); |