..
This commit is contained in:
@@ -2,7 +2,9 @@ package com.budwk.app.flow.vo;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
@@ -39,6 +41,9 @@ public class ProcessTaskVO extends ProcessTask {
|
||||
private Dict taskFormData;
|
||||
// @Schema(description = "任务参与者ID")
|
||||
private List<String> taskActorIdList;
|
||||
|
||||
private List<JSONObject> taskActorList;
|
||||
|
||||
// @Schema(description = "当前用户是否可执行")
|
||||
private boolean executable;
|
||||
// @Schema(description = "节点定义信息")
|
||||
@@ -47,7 +52,6 @@ public class ProcessTaskVO extends ProcessTask {
|
||||
if(this.ext!=null) return this.ext;
|
||||
String variable = getVariable();
|
||||
if(ObjectUtil.isEmpty(ext) && JSONUtil.isTypeJSON(variable)){
|
||||
// this.ext = JsonTool.fromJson(variable, Dict.class);
|
||||
this.ext = JSONUtil.toBean(variable, Dict.class);
|
||||
}
|
||||
return ext;
|
||||
@@ -57,37 +61,21 @@ public class ProcessTaskVO extends ProcessTask {
|
||||
if(this.instanceExt!=null) return this.instanceExt;
|
||||
String variable = getVariable();
|
||||
if(ObjectUtil.isEmpty(instanceExt) && JSONUtil.isTypeJSON(instanceVariable)){
|
||||
// this.instanceExt = JsonTool.fromJson(instanceVariable,Dict.class);
|
||||
this.instanceExt = JSONUtil.toBean(instanceVariable, Dict.class);
|
||||
}
|
||||
return instanceExt;
|
||||
}
|
||||
|
||||
// public Dict getTaskFormData() {
|
||||
// // f_前辍才是表单数据
|
||||
// this.taskFormData = Dict.of();
|
||||
// Dict ext = this.getExt();
|
||||
// List<String> formDataKeys = ext.keySet().stream().filter(key->key.startsWith(FlowConst.TASK_FORM_DATA_PREFIX)).collect(Collectors.toList());
|
||||
// formDataKeys.forEach(key->{
|
||||
// this.taskFormData.put(key,ext.get(key));
|
||||
// this.taskFormData.put(key.replaceAll(FlowConst.TASK_FORM_DATA_PREFIX,""),ext.get(key));
|
||||
// });
|
||||
// return taskFormData;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 后续个任务
|
||||
*/
|
||||
private List<TaskModel> nextTaskModels;
|
||||
|
||||
// private List<TaskModel> nextTaskModels() {
|
||||
// List<TaskModel> nextModels = new ArrayList<>();
|
||||
//
|
||||
// TaskModel model = getTaskModel();
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
public Dict getTaskFormData() {
|
||||
// f_前辍才是表单数据
|
||||
this.taskFormData = Dict.of();
|
||||
Dict ext = this.getExt();
|
||||
List<String> formDataKeys = ext.keySet().stream().filter(key->key.startsWith(FlowConst.TASK_FORM_DATA_PREFIX)).toList();
|
||||
formDataKeys.forEach(key->{
|
||||
this.taskFormData.put(key,ext.get(key));
|
||||
this.taskFormData.put(key.replaceAll(FlowConst.TASK_FORM_DATA_PREFIX,""),ext.get(key));
|
||||
});
|
||||
return taskFormData;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user