| | |
| | | if (storehouseDtoList != null && storehouseDtoList.size() > 0) { |
| | | storehouseDto1 = storehouseDtoList.get(0); |
| | | } |
| | | if (SH_TYPE_GROUP.equals(storehouseDto1.getShType())) {//集团仓库 |
| | | communityId = "9999"; |
| | | } else {//小区仓库 |
| | | communityId = storehouseDto1.getShObjId(); |
| | | } |
| | | //开启流程 |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(allocationStorehouseApplyDto.getStoreId(), communityId), allocationStorehouseApplyDto.getApplyId(), variables); |
| | | //将得到的实例流程id值赋给之前设置的变量 |
| | |
| | | variables.put("currentUserId", allocationStorehouseApplyDto.getCurrentUserId()); |
| | | variables.put("flag", "1200".equals(allocationStorehouseApplyDto.getAuditCode()) ? "false" : "true"); |
| | | variables.put("startUserId", allocationStorehouseApplyDto.getStartUserId()); |
| | | variables.put("nextStaffId", allocationStorehouseApplyDto.getNextUserId()); |
| | | variables.put("nextUserId", allocationStorehouseApplyDto.getNextUserId()); |
| | | taskService.complete(allocationStorehouseApplyDto.getTaskId(), variables); |
| | | ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); |
| | | if (pi == null) { |