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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
package com.vci.ubcs.code.entity;
 
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
 
import com.vci.ubcs.starter.annotation.Transient;
import com.vci.ubcs.starter.constant.CodeTableNameConstant;
import com.vci.ubcs.starter.revision.model.BaseModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.Alias;
 
import javax.validation.constraints.NotBlank;
import java.sql.Clob;
 
/**
 * 基础码段的信息
 * 方便在同一个页面里显示所有的码段
 * @author weidy
 * @date 2022-1-18
 */
@Data
@TableName(CodeTableNameConstant.PL_CODE_BASICSEC)
@ApiModel(value = "CodeBasicSec对象", description = "码段基础信息")
@EqualsAndHashCode(callSuper = true)
public class CodeBasicSec extends BaseModel {
 
    /**
     * 序列化
     */
    private static final long serialVersionUID = 1803476098497357359L;
 
    /**
     * 码段信息
     */
    @NotBlank(message = "码段信息不能为空")
    private String id;
 
    /**
     * 码段名称
     */
    @NotBlank(message = "码段名称不能为空")
    private String name;
 
    /**
     * 码段类型
     */
    @NotBlank(message = "码段类型不能为空")
    private String secType;
 
    /**
     * 码段长度类型显示文本
     */
    @Transient
    @TableField(exist = false)
    private String secTypeText;
 
    /**
     * 所属编码规则
     */
    @NotBlank(message = "所属编码规则不能为空")
    private String pkCodeRule;
 
    /**
     * 码段排序号
     */
    private Integer orderNum;
 
    /**
     * 引用的属性的文本
     */
    private String referAttributeName;
 
    /**
     * 引用的属性英文名称
     */
    private String referAttributeId;
 
    /**
     * 取值规则
     */
    private String getValueClass ;
 
    //前端输入后自动加入到枚举中
    /**
     * 日期格式
     */
    private String codeDateFormatStr;
 
    /**
     * 码段长度类型
     */
    //@VciUseEnum(value = MdmEnumIdConstant.CODE_SEC_LENGTH,showTextField = "secLengthTypeText")
    private String codeSecLengthType;
 
    /**
     * 码段长度类型显示文本
     */
    @TableField(exist = false)
    private String codeSecLengthTypeText;
 
    /**
     * 码段的长度
     */
    private String codeSecLength;
 
    /**
     * 层级类型
     */
    //@VciUseEnum(value = MdmEnumIdConstant.CODE_SEC_TYPE,showTextField = "secTypeText")
    private String codeLevelType;
 
    /**
     * 层级类型显示文本
     */
    @TableField(exist = false)
    private String codeLevelTypeText;
 
    /**
     * 层级的值
     */
    private Integer codeLevelValue;
 
    /**
     * 值截取长度
     */
    private Integer valueCutLength;
 
    /**
     * 字符截取类型
     */
    //@VciUseEnum(value = MdmEnumIdConstant.CODE_CUT_TYPE,showTextField = "valueCutTypeText")
    private String valueCutType;
 
    /**
     * 字符串截取类型显示文本
     */
    @Transient
    @TableField(exist = false)
    private String valueCutTypeText;
 
    /**
     * 取值类型
     */
    //@VciUseEnum(value = MdmEnumIdConstant.CODE_GET_VALUE_TYPE,showTextField = "codeGetValueTypeText")
    private String codeGetValueType;
 
    /**
     * 取值类型显示文本
     */
    @Transient
    @TableField(exist = false)
    private String codeGetValueTypeText;
 
    /**
     * 引用的属性所属的库分类
     */
    private String referCodeClassifyOid;
 
    /**
     * 引用的属性所属库分类的名称
     */
    @Transient(referColumn = "referCodeClassifyOid.name")
    @TableField(exist = false)
    private String referCodeClassifyOidName;
 
    /**
     * 引用的业务类型
     */
    private String referBtmId;
 
    /**
     * 引用的业务类型名称
     */
    private String referBtmName;
 
    /**
     * 参照的窗口配置
     */
    private String referConfig;
 
    /**
     * 显示信息
     */
    private String referValueInfo;
 
    /**
     * 过滤的sql内容
     */
    private String filterSql ;
 
    /**
     * 流水号起始值
     */
    private String serialStart;
 
    /**
     * 流水的步长
     */
    private Integer serialStep;
 
    /**
     * 编码补位方式
     */
    //@VciUseEnum(value = EnumIdConstant.CODE_FILL_TYPE,showTextField = "codeFillTypeText")
    private String codeFillType;
 
    /**
     * 编码补位方式显示文本
     */
    private String codeFillTypeText;
 
    /**
     * 补位时的字符
     */
    private String codeFillSeparator;
 
    /**
     * 填充长度
     */
    private String codeFillLength;
 
    /**
     * 上限
     */
    private Integer codeFillLimit;
 
    /**
     * 流水是否补码
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String codeFillFlag;
 
    /**
     * 自定义的流水算法类
     */
    private String customCodeSerialClass;
 
    /**
     * 自定义的流水算法类
     */
    private String customCodeSerialClassText;
 
    /***
     * 自定义流水类型
     */
    private String customCodeSerialType;
    /**
     * 是否自动匹配分类值
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String matchClassifyValueFlag;
 
    /**
     * 父分类码段主键
     */
    private String parentClassifySecOid;
 
    /**
     * 父分类码段名称
     */
    //@Transient(referColumn = "parentClassifySecOid.name")
    @Transient
    @TableField(exist = false)
    private String parentClassifySecText;
 
    /**
     * 是否可以为空
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String nullableFlag;
 
    /**
     * 是否参与编码
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String componentCodeFlag;
 
    /**
     * 是否流水依赖
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String serialDependFlag;
 
    /**
     * 是否显示
     */
    //@VciFieldType(VciFieldTypeEnum.VTBoolean)
    private String displayFlag;
 
    /**
     * 流水依赖顺序 TODO:本来是用来计算流水排序的,后面因为某些原因改用orderNum了
     */
    private Integer serialDependOrder;
 
    /**
     * 前缀
     */
    private String prefixCode;
 
    /**
     * 后缀
     */
    private String suffixCode;
 
}