反序列化问题。
This commit is contained in:
parent
f8b1019625
commit
bfb7e34839
@ -33,9 +33,6 @@ public class WorkflowNodeDefinitionDTO extends BaseDTO {
|
|||||||
@Schema(description = "X6图形配置JSON")
|
@Schema(description = "X6图形配置JSON")
|
||||||
private JsonNode graphConfig;
|
private JsonNode graphConfig;
|
||||||
|
|
||||||
@Schema(description = "表单配置JSON")
|
|
||||||
private JsonNode formConfig;
|
|
||||||
|
|
||||||
@Schema(description = "排序号")
|
@Schema(description = "排序号")
|
||||||
private Integer orderNum;
|
private Integer orderNum;
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,12 @@ public class WorkflowDefinitionNode {
|
|||||||
*/
|
*/
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点Code
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节点类型
|
* 节点类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -67,6 +67,10 @@ public class WorkflowNodeGraph {
|
|||||||
|
|
||||||
private int height;
|
private int height;
|
||||||
|
|
||||||
|
public Size() {
|
||||||
|
// 默认构造函数
|
||||||
|
}
|
||||||
|
|
||||||
public Size(int width, int height) {
|
public Size(int width, int height) {
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
@ -88,6 +92,10 @@ public class WorkflowNodeGraph {
|
|||||||
|
|
||||||
private int strokeWidth = 2;// 边框宽度
|
private int strokeWidth = 2;// 边框宽度
|
||||||
|
|
||||||
|
public Style() {
|
||||||
|
// 默认构造函数
|
||||||
|
}
|
||||||
|
|
||||||
public Style(String fill, String stroke, String icon) {
|
public Style(String fill, String stroke, String icon) {
|
||||||
this.fill = fill;
|
this.fill = fill;
|
||||||
this.stroke = stroke;
|
this.stroke = stroke;
|
||||||
@ -103,6 +111,11 @@ public class WorkflowNodeGraph {
|
|||||||
public static class Ports {
|
public static class Ports {
|
||||||
private Map<String, PortGroup> groups;
|
private Map<String, PortGroup> groups;
|
||||||
|
|
||||||
|
public Ports() {
|
||||||
|
// 默认构造函数
|
||||||
|
this.groups = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取端口类型列表
|
* 获取端口类型列表
|
||||||
* @return 端口类型列表("in"/"out")
|
* @return 端口类型列表("in"/"out")
|
||||||
@ -119,11 +132,19 @@ public class WorkflowNodeGraph {
|
|||||||
public static class PortGroup {
|
public static class PortGroup {
|
||||||
private String position;
|
private String position;
|
||||||
private PortAttrs attrs;
|
private PortAttrs attrs;
|
||||||
|
|
||||||
|
public PortGroup() {
|
||||||
|
// 默认构造函数
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class PortAttrs {
|
public static class PortAttrs {
|
||||||
private PortCircle circle;
|
private PortCircle circle;
|
||||||
|
|
||||||
|
public PortAttrs() {
|
||||||
|
// 默认构造函数
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -131,5 +152,9 @@ public class WorkflowNodeGraph {
|
|||||||
private int r;
|
private int r;
|
||||||
private String fill;
|
private String fill;
|
||||||
private String stroke;
|
private String stroke;
|
||||||
|
|
||||||
|
public PortCircle() {
|
||||||
|
// 默认构造函数
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,18 +77,6 @@ public class WorkflowNodeDefinition extends Entity<Long> {
|
|||||||
@Column(columnDefinition = "text", nullable = false)
|
@Column(columnDefinition = "text", nullable = false)
|
||||||
private JsonNode graphConfig;
|
private JsonNode graphConfig;
|
||||||
|
|
||||||
/**
|
|
||||||
* 表单配置 JSON
|
|
||||||
* 定义节点的可配置属性,用于前端动态渲染表单
|
|
||||||
* 包含:
|
|
||||||
* - 基础属性(名称、描述等)
|
|
||||||
* - 业务属性(具体节点类型的特定属性)
|
|
||||||
* - 表单验证规则
|
|
||||||
*/
|
|
||||||
@Type(JsonType.class)
|
|
||||||
@Column(columnDefinition = "text")
|
|
||||||
private JsonNode formConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序号
|
* 排序号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -309,6 +309,7 @@ public class WorkflowDefinitionGraph {
|
|||||||
private static WorkflowDefinitionNode createNode(String id, NodeTypeEnums type, String name, int x, int y, Map<String, Object> config) {
|
private static WorkflowDefinitionNode createNode(String id, NodeTypeEnums type, String name, int x, int y, Map<String, Object> config) {
|
||||||
WorkflowDefinitionNode node = new WorkflowDefinitionNode();
|
WorkflowDefinitionNode node = new WorkflowDefinitionNode();
|
||||||
node.setId(id);
|
node.setId(id);
|
||||||
|
node.setCode(type.getCode()); // 直接使用枚举的code
|
||||||
node.setType(type);
|
node.setType(type);
|
||||||
node.setName(name);
|
node.setName(name);
|
||||||
node.setConfig(config);
|
node.setConfig(config);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user