TTInfo.java
4.53 KB
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
package com.bsth.entity.schedule;
import com.bsth.entity.Line;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import java.util.Date;
/**
* 时刻表信息
*/
@Entity
@Table(name="bsth_c_s_ttinfo")
@NamedEntityGraphs({
@NamedEntityGraph(name = "ttInfo_xl", attributeNodes = {
@NamedAttributeNode("xl"),
@NamedAttributeNode("createBy"),
@NamedAttributeNode("updateBy")
})
})
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
public class TTInfo extends BEntity {
/** 主键Id */
@Id
@GeneratedValue
private Long id;
/** 线路关联 */
@ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
private Line xl;
/** 时刻表名称 */
@Column(nullable = false)
private String name;
/** 线路方向(TODO:上下行,上行,下行,这个以后用枚举还是字典再议,现在先用文字) */
@Column(nullable = false)
private String xlDir;
/** 启用日期 */
@Column(nullable = false)
private Date qyrq;
/** 是否启用调度模版 */
@Column(nullable = false)
private Boolean isEnableDisTemplate;
/** 是否删除(标记) */
@Column(nullable = false)
private Boolean isCancel = false;
/** 模版类型(TODO:时刻表,间隔式,这个以后用枚举还是字典再议,现在先用文字) */
private String templateType;
// TODO:还有很多判定条件,这里先不放
/** 路牌数(这两个字段暂时不用) */
private int lpCount;
/** 圈数(这两个字段暂时不倒) */
private int loopCount;
// TODO:原系统里的分别在,圈后圈进场,意思不知道,再议
/** 常规有效日(1-7表示星期一到星期日,多个用逗号隔开) */
private String rule_days;
/** 特殊有效日期(格式:2001-01-01,多个用逗号隔开) */
private String special_days;
public TTInfo() {}
public TTInfo(Object id, Object xlid, Object name, Object nds, Object sds) {
if (id != null) {
this.id = Long.parseLong(id.toString());
}
if (xlid != null) {
this.xl = new Line();
this.xl.setId(Integer.valueOf(xlid.toString()));
}
if (name != null) {
this.name = String.valueOf(name);
}
if (nds != null) {
this.rule_days = String.valueOf(nds);
}
if (sds != null) {
this.special_days = String.valueOf(sds);
}
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Line getXl() {
return xl;
}
public void setXl(Line xl) {
this.xl = xl;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getXlDir() {
return xlDir;
}
public void setXlDir(String xlDir) {
this.xlDir = xlDir;
}
public Date getQyrq() {
return qyrq;
}
public void setQyrq(Date qyrq) {
this.qyrq = qyrq;
}
public String getTemplateType() {
return templateType;
}
public void setTemplateType(String templateType) {
this.templateType = templateType;
}
public Boolean getIsEnableDisTemplate() {
return isEnableDisTemplate;
}
public void setIsEnableDisTemplate(Boolean isEnableDisTemplate) {
this.isEnableDisTemplate = isEnableDisTemplate;
}
public int getLpCount() {
return lpCount;
}
public void setLpCount(int lpCount) {
this.lpCount = lpCount;
}
public int getLoopCount() {
return loopCount;
}
public void setLoopCount(int loopCount) {
this.loopCount = loopCount;
}
public String getRule_days() {
return rule_days;
}
public void setRule_days(String rule_days) {
this.rule_days = rule_days;
}
public String getSpecial_days() {
return special_days;
}
public void setSpecial_days(String special_days) {
this.special_days = special_days;
}
public Boolean getIsCancel() {
return isCancel;
}
public void setIsCancel(Boolean isCancel) {
this.isCancel = isCancel;
}
}