LineConfig.java
5.08 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
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
package com.bsth.entity.realcontrol;
import com.bsth.entity.Line;
import com.google.common.base.Splitter;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.persistence.*;
import java.util.List;
/**
*
* @ClassName: LineConfig
* @Description: TODO(线调 线路相关配置信息)
* @author PanZhao
* @date 2016年8月15日 下午1:57:56
*
*/
@Entity
@Table(name = "bsth_c_line_config")
@NamedEntityGraphs({
@NamedEntityGraph(name = "lineConfig_line_80temps", attributeNodes = {
@NamedAttributeNode("line")
})
})
public class LineConfig {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@OneToOne
private Line line;
/** 开始运营时间 HH:mm */
private String startOpt;
/** 出场时间设置 0:真实出场(设备离开缓冲区时间) 1:请求出场时间 2:出站即出场 */
private int outConfig;
/** 出站既出场 对应的停车场 , 号分割多个*/
private String twinsParks;
/** 出站既出场 对应的起点站 */
private String twinsStations;
/** 调度指令模板 */
private String schDirectiveTemp;
/** 识别区间调头 */
private boolean readReverse;
/** 原线路回场 */
private boolean inParkForSource;
/** 自动执行 */
private boolean autoExec;
/**
* 自动执行偏差值(分钟)
*/
private int autoExecOffset;
/**
* 到离站偏移值
*/
//上行进站
private int upInDiff;
//上行出站
private int upOutDiff;
//下行进站
private int downInDiff;
//下行出站
private int downOutDiff;
/**
* 应急停靠
*/
private boolean enableYjtk;
/** HH:mm */
private String yjtkStart;
/** HH:mm */
private String yjtkEnd;
private int upStopMinute;
private int downStopMinute;
/**
* 使用第一个发车时间,不匹配最佳时间
*/
private boolean lockFirstOutTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Line getLine() {
return line;
}
public void setLine(Line line) {
this.line = line;
}
public String getStartOpt() {
return startOpt;
}
public void setStartOpt(String startOpt) {
this.startOpt = startOpt;
}
public int getOutConfig() {
return outConfig;
}
public void setOutConfig(int outConfig) {
this.outConfig = outConfig;
}
public String getSchDirectiveTemp() {
return schDirectiveTemp;
}
public void setSchDirectiveTemp(String schDirectiveTemp) {
this.schDirectiveTemp = schDirectiveTemp;
}
public boolean isReadReverse() {
return readReverse;
}
public void setReadReverse(boolean readReverse) {
this.readReverse = readReverse;
}
public boolean isInParkForSource() {
return inParkForSource;
}
public void setInParkForSource(boolean inParkForSource) {
this.inParkForSource = inParkForSource;
}
public int getUpInDiff() {
return upInDiff;
}
public void setUpInDiff(int upInDiff) {
this.upInDiff = upInDiff;
}
public int getUpOutDiff() {
return upOutDiff;
}
public void setUpOutDiff(int upOutDiff) {
this.upOutDiff = upOutDiff;
}
public int getDownInDiff() {
return downInDiff;
}
public void setDownInDiff(int downInDiff) {
this.downInDiff = downInDiff;
}
public int getDownOutDiff() {
return downOutDiff;
}
public void setDownOutDiff(int downOutDiff) {
this.downOutDiff = downOutDiff;
}
public String getYjtkStart() {
return yjtkStart;
}
public void setYjtkStart(String yjtkStart) {
this.yjtkStart = yjtkStart;
}
public String getYjtkEnd() {
return yjtkEnd;
}
public void setYjtkEnd(String yjtkEnd) {
this.yjtkEnd = yjtkEnd;
}
public int getUpStopMinute() {
return upStopMinute;
}
public void setUpStopMinute(int upStopMinute) {
this.upStopMinute = upStopMinute;
}
public int getDownStopMinute() {
return downStopMinute;
}
public void setDownStopMinute(int downStopMinute) {
this.downStopMinute = downStopMinute;
}
public boolean isEnableYjtk() {
return enableYjtk;
}
public void setEnableYjtk(boolean enableYjtk) {
this.enableYjtk = enableYjtk;
}
public boolean isLockFirstOutTime() {
return lockFirstOutTime;
}
public void setLockFirstOutTime(boolean lockFirstOutTime) {
this.lockFirstOutTime = lockFirstOutTime;
}
public boolean isAutoExec() {
return autoExec;
}
public void setAutoExec(boolean autoExec) {
this.autoExec = autoExec;
}
public int getAutoExecOffset() {
return autoExecOffset;
}
public void setAutoExecOffset(int autoExecOffset) {
this.autoExecOffset = autoExecOffset;
}
public String getTwinsParks() {
return twinsParks;
}
public void setTwinsParks(String twinsParks) {
this.twinsParks = twinsParks;
}
public String getTwinsStations() {
return twinsStations;
}
public void setTwinsStations(String twinsStations) {
this.twinsStations = twinsStations;
}
@Transient
Logger logger = LoggerFactory.getLogger(this.getClass());
public List<String> findTwinsParkList() {
try{
if(StringUtils.isEmpty(this.twinsParks))
return null;
return Splitter.on(",").splitToList(this.twinsParks);
}catch (Exception e){
logger.error("", e);
return null;
}
}
}