| | |
| | | |
| | | import java.io.InputStream; |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | newV.put(task.getTaskDefinitionKey() + "&" + key, variables.get(key)); |
| | | //字典里有就放入流程变量中 |
| | | if (!CollectionUtils.isEmpty(dictList) && dictList.contains(key)) { |
| | | processVariables.put(key,variables.get(key)); |
| | | if ("money".equals(key)) { |
| | | // 万元转元 |
| | | Object w = variables.get(key); |
| | | BigDecimal y = new BigDecimal(w.toString()).multiply(new BigDecimal(10000)); |
| | | processVariables.put(key, y); |
| | | } else { |
| | | processVariables.put(key,variables.get(key)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // 判断前置任务是不是和当前任务为同一个executeId |
| | | // 判断当前任务是否被挂起中 |
| | | String finalProcessInsId = processInsId; |
| | | beforeNodes.stream().filter(node -> { |
| | | beforeNodes = beforeNodes.stream().filter(node -> { |
| | | if (node.getCurrent()) { |
| | | return Boolean.TRUE; |
| | | } |
| | | HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(finalProcessInsId).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); |
| | | return Objects.nonNull(beforeTask); |
| | | }).forEach(node -> { |
| | | }).collect(Collectors.toList()); |
| | | beforeNodes.forEach(node -> { |
| | | if (node.getCurrent()) { |
| | | if (processLogService.taskIsHangup(taskId, finalProcessInsId)) { |
| | | node.setTaskStatus(TaskStatusEnum.HANGUP); |