| | |
| | | //将信息加入map,以便传入流程中 |
| | | Map<String, Object> variables = new HashMap<String, Object>(); |
| | | variables.put("purchaseApplyDto", purchaseApplyDto); |
| | | variables.put("nextAuditStaffId", purchaseApplyDto.getStaffId()); |
| | | variables.put("nextAuditStaffId", purchaseApplyDto.getNextStaffId()); |
| | | variables.put("userId", purchaseApplyDto.getCurrentUserId()); |
| | | variables.put("startUserId", purchaseApplyDto.getCurrentUserId()); |
| | | variables.put("nextUserId", purchaseApplyDto.getNextStaffId()); |
| | | |
| | | //开启流程 |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(purchaseApplyDto.getStoreId()), purchaseApplyDto.getApplyOrderId(), variables); |
| | | //获取申请id |
| | |
| | | variables.put("currentUserId", purchaseApplyDto.getCurrentUserId()); |
| | | variables.put("flag", "1200".equals(purchaseApplyDto.getAuditCode()) ? "false" : "true"); |
| | | variables.put("startUserId", purchaseApplyDto.getStartUserId()); |
| | | variables.put("nextUserId", purchaseApplyDto.getNextStaffId()); |
| | | taskService.complete(purchaseApplyDto.getTaskId(), variables); |
| | | ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); |
| | | if (pi == null) { |