fuliqi
2025-01-14 4ba503fbdcba28ba7fa26ed8b219a20658a44060
flowable/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java
@@ -144,12 +144,12 @@
                newV.put(task.getTaskDefinitionKey() + "&" + key, variables.get(key));
                //字典里有就放入流程变量中
                if (!CollectionUtils.isEmpty(dictList) && dictList.contains(key)) {
                    processVariables.put(key,variables.get(key));
                    processVariables.put(key, variables.get(key));
                }
            }
        }
        //添加流程变量
        if(!processVariables.isEmpty()) taskService.setVariables(taskId,processVariables);
        if (!processVariables.isEmpty()) taskService.setVariables(taskId, processVariables);
        taskService.addComment(taskId, task.getProcessInstanceId(), FlowComment.SUBMIT.getType(), "完成提交");
        // 判断当前任务是不是转办过的
        Boolean delegation = flowLogService.taskDelegation(task.getProcessInstanceId(), task.getId());
@@ -1302,9 +1302,11 @@
                });
                // 设置已填写的表单为禁用状态
                for (JSONObject oldField : oldFields) {
                    JSONObject options = oldField.getJSONObject("options");
                    options.put("disabled", true);
                if (!CollectionUtils.isEmpty(oldFields)) {
                    for (JSONObject oldField : oldFields) {
                        JSONObject options = oldField.getJSONObject("options");
                        options.put("disabled", true);
                    }
                }
                // TODO 暂时只处理用户任务上的表单
//                if (StringUtils.isNotBlank(task.getFormKey())) {