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
package pwc.taxtech.atms.constant.enums;
import java.util.HashMap;
import java.util.Map;
public class StdAccountEnum {
public enum RuleType {
TWO(2);
private Integer code;
RuleType(Integer code) {
this.code = code;
}
public Integer getCode() {
return code;
}
}
public enum AcctProp {
Asset("1", "资产"),
Debt("2", "负债"),
Joint("3", "共同"),
Equity("4", "权益"),
Cost("5", "成本"),
Loss("6", "损益");
private String code;
private String name;
public static final Map<String, String> MAPPING = new HashMap<>();
AcctProp(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (AcctProp acctProp : AcctProp.values()) {
MAPPING.put(acctProp.getCode(), acctProp.getName());
}
}
}
public enum Direction {
Debit(1, "借方"),
Credit(-1, "贷方");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
Direction(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (Direction direction : Direction.values()) {
MAPPING.put(direction.getCode(), direction.getName());
}
}
}
}