..
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程高亮数据
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class HighLightVO {
|
||||
@ApiModelProperty("历史节点名称集合")
|
||||
private List<String> historyNodeNames = new ArrayList<>();
|
||||
@ApiModelProperty("历史边名称集合")
|
||||
private List<String> historyEdgeNames = new ArrayList<>();
|
||||
@ApiModelProperty("进行中节点名称集合")
|
||||
private List<String> activeNodeNames = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import com.budwk.app.flow.entity.ProcessCcInstance;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程实例抄送
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-12-05
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("流程实例抄送VO")
|
||||
public class ProcessCcInstanceVO extends ProcessCcInstance {
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程定义
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("流程定义VO")
|
||||
public class ProcessDefineVO extends ProcessDefine {
|
||||
@ApiModelProperty("流程定义json对象")
|
||||
private JSONObject jsonObject;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import com.budwk.app.flow.entity.ProcessDesignHis;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程设计历史
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("流程设计历史VO")
|
||||
public class ProcessDesignHisVO extends ProcessDesignHis {
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程设计分类
|
||||
* @author mldong
|
||||
* @date 2023/10/12
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessDesignTypeVO", description = "流程设计分类")
|
||||
public class ProcessDesignTypeVO {
|
||||
|
||||
// @Schema(description = "流程分类编码")
|
||||
private String type;
|
||||
// @Schema(description = "流程分类显示文本")
|
||||
private String title;
|
||||
// @Schema(description = "流程设计")
|
||||
// private List<ProcessDesignVO> items;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.flow.entity.ProcessDesign;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程设计
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-25
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessDesignVO对象", description = "流程设计VO")
|
||||
public class ProcessDesignVO extends ProcessDesign {
|
||||
// @Schema(description = "流程定义ID")
|
||||
private Long processDefineId;
|
||||
// @Schema(description = "流程设计json对象")
|
||||
private Dict jsonObject;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
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.entity.ProcessInstance;
|
||||
import lombok.Data;
|
||||
import org.beetl.core.misc.JsonTool;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程实例
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-26
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessInstanceVO对象", description = "流程实例VO")
|
||||
public class ProcessInstanceVO extends ProcessInstance {
|
||||
// @Schema(description = "定义名称")
|
||||
private String displayName;
|
||||
// @Schema(description = "唯一编码")
|
||||
private String name;
|
||||
// @Schema(description = "流程设计json对象")
|
||||
private JSONObject jsonObject;
|
||||
// @Schema(description = "定义版本")
|
||||
private Integer version;
|
||||
// @Schema(description = "JSON对象")
|
||||
private Dict ext;
|
||||
// @Schema(description = "表单数据")
|
||||
private Dict formData;
|
||||
public Dict getFormData() {
|
||||
// f_前辍才是表单数据
|
||||
this.formData = Dict.of();
|
||||
Dict ext = this.getExt();
|
||||
List<String> formDataKeys = ext.keySet().stream().filter(key->key.startsWith(FlowConst.FORM_DATA_PREFIX)).toList();
|
||||
formDataKeys.forEach(key->{
|
||||
this.formData.put(key,ext.get(key));
|
||||
this.formData.put(key.replaceAll(FlowConst.FORM_DATA_PREFIX,""),ext.get(key));
|
||||
});
|
||||
return formData;
|
||||
}
|
||||
public Dict getExt() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import com.budwk.app.flow.entity.ProcessSurrogate;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程委托代理
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-12-06
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessSurrogateVO对象", description = "流程委托代理VO")
|
||||
public class ProcessSurrogateVO extends ProcessSurrogate {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程任务和参与人关系
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-26
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessTaskActorVO对象", description = "流程任务和参与人关系VO")
|
||||
public class ProcessTaskActorVO extends ProcessTaskActor {
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.budwk.app.flow.vo;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程任务
|
||||
* </p>
|
||||
*
|
||||
* @author mldong
|
||||
* @since 2023-09-26
|
||||
*/
|
||||
@Data
|
||||
//@Schema(name = "ProcessTaskVO对象", description = "流程任务VO")
|
||||
public class ProcessTaskVO extends ProcessTask {
|
||||
// @Schema(description = "流程定义名称")
|
||||
private String processDefineName;
|
||||
// @Schema(description = "流程定义显示名称")
|
||||
private String processDefineDisplayName;
|
||||
// @Schema(description = "JSON对象")
|
||||
private Dict ext;
|
||||
// @Schema(description = "流程实例参数")
|
||||
private String instanceVariable;
|
||||
// @Schema(description = "流程实例参数JSON对象")
|
||||
private Dict instanceExt;
|
||||
// @Schema(description = "流程发起时间")
|
||||
private String instanceCreateTime;
|
||||
// @Schema(description = "任务表单数据")
|
||||
private Dict taskFormData;
|
||||
// @Schema(description = "任务参与者ID")
|
||||
private List<String> taskActorIdList;
|
||||
// @Schema(description = "当前用户是否可执行")
|
||||
private boolean executable;
|
||||
// @Schema(description = "节点定义信息")
|
||||
private TaskModel taskModel;
|
||||
public Dict getExt() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Dict getInstanceExt() {
|
||||
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();
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user