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
| package com.consum.base.core;
|
| public enum CodeGeneratorEnum {
|
| // TODO: 10/10/2023 需要补全编码类型
|
| /**
| * 仓库编码,简写:WH
| */
| Warehouse("WH"),
| /**
| * 入库单编码,简写:RK
| */
| InPut_Warehouse("RK"),
|
| /**
| * 采购入库
| */
| Procure_Warehouse("CG"),
|
| /**
| * 调拨
| */
| Transfer("DB"),
|
| /**
| * 出库单编码,简写:CK
| */
| OutPut_Warehouse("CK");
|
| private String value;
|
| CodeGeneratorEnum(String prefix) {
| this.value = prefix;
| }
|
| public String getValue() {
| return value;
| }
|
| /**
| * 根据编码获取对应枚举
| *
| * @param key 编码
| * @return
| */
| public static CodeGeneratorEnum getValueByKey(String key) {
| for (CodeGeneratorEnum myEnum : CodeGeneratorEnum.values()) {
| if (myEnum.name().equals(key)) {
| return myEnum;
| }
| }
| return null;
| }
| }
|
|