wuxw
2019-11-07 50e80ce86a51c04b82e75efbd76a50a0227d6db4
CommonService/src/main/java/com/java110/common/smo/impl/ComplaintUserInnerServiceSMOImpl.java
@@ -166,6 +166,7 @@
                .taskAssignee(user.getUserId());
        return query.count();
    }
    /**
     * 获取用户审批的任务
     *
@@ -174,10 +175,10 @@
    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) {
@@ -214,8 +215,10 @@
        taskService.addComment(complaintDto.getTaskId(), processInstanceId, complaintDto.getAuditMessage());
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("auditCode", complaintDto.getAuditCode());
        //variables.put("userId", complaintDto.getCurrentUserId());
        variables.put("currentUserId", complaintDto.getCurrentUserId());
        //taskService.setAssignee(complaintDto.getTaskId(),complaintDto.getCurrentUserId());
        //taskService.addCandidateUser(complaintDto.getTaskId(), complaintDto.getCurrentUserId());
        //taskService.claim(complaintDto.getTaskId(), complaintDto.getCurrentUserId());
        taskService.complete(complaintDto.getTaskId(), variables);
        ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();