yangys
2025-09-13 e853c35455332a4652ec604c650ca82c411c864d
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package org.springblade.mdm.program.entity;
 
import com.alibaba.excel.util.StringUtils;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import org.springblade.core.mp.base.BizEntity;
import org.springblade.mdm.flow.entity.FlowProgramFile;
 
import java.util.Date;
 
 
@Setter
@Getter
@TableName("mdm_nc_node_his")
public class NcNodeHis extends BizEntity {
 
    private String name;
    private Long parentId;
 
    /**
     * 上级父id集合
     */
    private String parentIds;
    /**
     * 设备编号
     */
    private String machineCode;
    /**
     * 机床组字典吗
     */
    private String machineGroupCode;
    /**
     * 工序,如“精铣”
     */
    private String processName;
 
    /**
     * 工序版次
     */
    private String processEdition;
 
    /**
     * 工艺版次
     */
    private String craftEdition;
    /**
     * 是否最新版次,1:最新版次;0:历史版次
     */
    private Integer isLastEdition = 1;
    /**
     * 零组件号/图号
     */
    private String drawingNo;
    /**
     * 图号版次
     */
    private String drawingNoEdition;
 
    /**
     * 是否固化
     */
    private Integer isCured = 0;
    /**
     * 过期日期
     */
    private Date expireDate;
    /**
     * 是否锁定
     */
    private Integer isLocked = 0;
    /**
     * 节点类型:字典
      */
    private String nodeType;
 
    /**
     * 程序文件节点的数据
     */
    private String processNo;
    /**
     * 产品型号
     */
    private String productModel;
 
    /**
     * 程序编号(程序包名节点需要)
     */
    private String programNo;
    /**
     * 历史序列号
     */
    private Long hisSerial;
    /**
     * 流程程序文件id,只有程序文件(70)类型的节点有此值
     */
    private Long flowProgramFileId;
 
    /**
     * 审批时的流程实例id,只有程序包节点有这个字段值
     */
    private String processInstanceId;
    /**
     * 偏离单号
     */
    private String deviation;
    /**
     * 版本号,更新一次(入升版,dnc导入),就会+1
     */
    private Integer versionNumber = 1;
 
    transient FlowProgramFile flowProgramFile;
 
    /**
     * 是否是偏离程序
     * @return 是否偏离
     */
    public boolean isDeviationProgram(){
        return StringUtils.isNotBlank(this.deviation);
    }
 
    /**
     * 是否在有效期内
     * @return 是否
     */
    public boolean withinValidityPeriod() {
        if(expireDate == null){
            return true;
        }
        return expireDate.getTime() > System.currentTimeMillis();
    }
 
    /**
     * 是否已经固化
     * @return 是否
     */
    public boolean hasCured() {
        return this.isCured != null && this.isCured == 1;
    }
 
 
    /**
     * 是否已锁定
     * @return 是否
     */
    public boolean hasLocked() {
        return this.isLocked != null && this.isLocked == NcNode.LOCKED;
    }
}