yangys
2025-08-17 0ef4cc755bddd87799b8bfdd65c8123df6e149d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.springblade.mdm.gkw.programnode.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.springblade.mdm.commons.vo.BaseVO;
 
import java.util.ArrayList;
import java.util.List;
 
@Setter
@Getter
@EqualsAndHashCode
public class ProgramNodeVO {
    @Schema(description = "节点id")
    private String id;
    @Schema(description = "节点名称")
    private String name;
    @Schema(description = "父ID,根节点父id=0")
    private Long parentId;
    @Schema(description = "所有上级节点id")
    private String parentIds;
 
    @Schema(description = "节点类型,字典(程序节点类型nc_node_type)")
    private String nodeType;
    @Schema(description = "目录类型:REC/SEND/TEMP")
    private String dirType;
    @Schema(description = "机床编码")
    private String machineCode;
    @Schema(description = "是否有子节点")
    private Boolean hasChildren;
 
    @Schema(description = "子节点")
    private List<ProgramNodeVO> children;
    @Schema(description = "流程实例id,程序包节点有此属性")
    private String processInstanceId;
    public void addChildren(ProgramNodeVO node){
        if(children == null){
            children = new ArrayList<ProgramNodeVO>();
        }
        if(!children.contains(node)){
            children.add(node);
        }
    }
}