Commit 839bcb4fa234d2c49560f7152aba473f9c63df05

Authored by 王通
1 parent 4d55e2d7

1.车、线、站点、路段接口微调

src/main/java/com/bsth/server_rs/base_info/line/Line.java
1 -package com.bsth.server_rs.base_info.line;  
2 -  
3 -import com.bsth.server_rs.adapter.DateTimeAdapter;  
4 -  
5 -import javax.xml.bind.annotation.XmlRootElement;  
6 -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;  
7 -import java.io.Serializable;  
8 -import java.util.Date;  
9 -  
10 -  
11 -/**  
12 - * @ClassName: Line(线路实体类)  
13 - * @Description: TODO(线路)  
14 - * @Author bsth@lq  
15 - * @Date 2016-4-11 16:06:17  
16 - * @Version 公交调度系统BS版 0.1  
17 - */  
18 -@XmlRootElement  
19 -public class Line implements Serializable {  
20 -  
21 -  
22 - /**线路名称 varchar length(50) 不能为空*/  
23 - private String name;  
24 -  
25 - /** 线路编码 varchar length(50) 不能为空*/  
26 - private String lineCode;  
27 -  
28 - /** 起始站名称*/  
29 - private String startStationName;  
30 -  
31 - /** 终点站名称*/  
32 - private String endStationName;  
33 -  
34 - /** 起始站首班车时间 00:00 */  
35 - private String startStationFirstTime;  
36 -  
37 - /** 起始站末班车时间 00:00 */  
38 - private String startStationEndTime;  
39 -  
40 - /** 终点站首班时间 00:00 */  
41 - private String endStationFirstTime;  
42 -  
43 - /** 终点站末班时间 00:00 */  
44 - private String endStationEndTime;  
45 -  
46 - /** 所属公司 */  
47 - private String company;  
48 -  
49 - /**  
50 - * 所属公司名称  
51 - */  
52 - private String companyName;  
53 -  
54 - /** 分公司 */  
55 - private String brancheCompany;  
56 -  
57 - /** 性质(线路类型) */  
58 - private String nature;  
59 -  
60 - /**线路等级 */  
61 - private String level;  
62 -  
63 - /**是否撤销 <1:是;0:否> */  
64 - private Integer destroy;  
65 -  
66 - /** 是否夜宵线 <1:是;0:否> */  
67 - private Integer supperLine;  
68 -  
69 - /** 设备线路编码 */  
70 - private String eqLinecode;  
71 -  
72 - /**  
73 - * 创建日期 timestamp  
74 - */  
75 - private Date createDate;  
76 -  
77 - //-------------- 标准信息 -----------  
78 - /** 标准总里程 */  
79 - private Double totalMileage;  
80 - /** 早高峰大间隔(分钟) */  
81 - private Double earlyIntervalLg;  
82 -  
83 - /** 晚高峰大间隔(分钟) */  
84 - private Double lateIntervalLg;  
85 -  
86 - /** 平时大间隔(分钟) */  
87 - private Double intervalLg;  
88 -  
89 - /** 限速(平时) */  
90 - private Double speedLimit;  
91 -  
92 - /** 滞站 */  
93 - private Integer lagStation;  
94 -  
95 - /** 越站 */  
96 - private Integer skip;  
97 -  
98 - /** 超速 */  
99 - private Integer speeding;  
100 -  
101 - /** 串线 */  
102 - private Integer crossedLine;  
103 -  
104 - /** 越界 */  
105 - private Integer overflights;  
106 -  
107 - /**  
108 - * 上海市线路编码  
109 - */  
110 - private String shanghaiLinecode;  
111 -  
112 - // 环线或双向  
113 - private int linePlayType;  
114 - // 区内/外  
115 - private int region;  
116 -  
117 - public String getName() {  
118 - return name;  
119 - }  
120 -  
121 - public void setName(String name) {  
122 - this.name = name;  
123 - }  
124 -  
125 - public String getLineCode() {  
126 - return lineCode;  
127 - }  
128 -  
129 - public void setLineCode(String lineCode) {  
130 - this.lineCode = lineCode;  
131 - }  
132 -  
133 - public String getStartStationName() {  
134 - return startStationName;  
135 - }  
136 -  
137 - public void setStartStationName(String startStationName) {  
138 - this.startStationName = startStationName;  
139 - }  
140 -  
141 - public String getEndStationName() {  
142 - return endStationName;  
143 - }  
144 -  
145 - public void setEndStationName(String endStationName) {  
146 - this.endStationName = endStationName;  
147 - }  
148 -  
149 - public String getStartStationFirstTime() {  
150 - return startStationFirstTime;  
151 - }  
152 -  
153 - public void setStartStationFirstTime(String startStationFirstTime) {  
154 - this.startStationFirstTime = startStationFirstTime;  
155 - }  
156 -  
157 - public String getStartStationEndTime() {  
158 - return startStationEndTime;  
159 - }  
160 -  
161 - public void setStartStationEndTime(String startStationEndTime) {  
162 - this.startStationEndTime = startStationEndTime;  
163 - }  
164 -  
165 - public String getEndStationFirstTime() {  
166 - return endStationFirstTime;  
167 - }  
168 -  
169 - public void setEndStationFirstTime(String endStationFirstTime) {  
170 - this.endStationFirstTime = endStationFirstTime;  
171 - }  
172 -  
173 - public String getEndStationEndTime() {  
174 - return endStationEndTime;  
175 - }  
176 -  
177 - public void setEndStationEndTime(String endStationEndTime) {  
178 - this.endStationEndTime = endStationEndTime;  
179 - }  
180 -  
181 - public String getCompany() {  
182 - return company;  
183 - }  
184 -  
185 - public void setCompany(String company) {  
186 - this.company = company;  
187 - }  
188 -  
189 - public String getCompanyName() {  
190 - return companyName;  
191 - }  
192 -  
193 - public void setCompanyName(String companyName) {  
194 - this.companyName = companyName;  
195 - }  
196 -  
197 - public String getBrancheCompany() {  
198 - return brancheCompany;  
199 - }  
200 -  
201 - public void setBrancheCompany(String brancheCompany) {  
202 - this.brancheCompany = brancheCompany;  
203 - }  
204 -  
205 - public String getNature() {  
206 - return nature;  
207 - }  
208 -  
209 - public void setNature(String nature) {  
210 - this.nature = nature;  
211 - }  
212 -  
213 - public String getLevel() {  
214 - return level;  
215 - }  
216 -  
217 - public void setLevel(String level) {  
218 - this.level = level;  
219 - }  
220 -  
221 - public Integer getDestroy() {  
222 - return destroy;  
223 - }  
224 -  
225 - public void setDestroy(Integer destroy) {  
226 - this.destroy = destroy;  
227 - }  
228 -  
229 - public Integer getSupperLine() {  
230 - return supperLine;  
231 - }  
232 -  
233 - public void setSupperLine(Integer supperLine) {  
234 - this.supperLine = supperLine;  
235 - }  
236 -  
237 - public String getEqLinecode() {  
238 - return eqLinecode;  
239 - }  
240 -  
241 - public void setEqLinecode(String eqLinecode) {  
242 - this.eqLinecode = eqLinecode;  
243 - }  
244 -  
245 - @XmlJavaTypeAdapter(DateTimeAdapter.class)  
246 - public Date getCreateDate() {  
247 - return createDate;  
248 - }  
249 -  
250 - public void setCreateDate(Date createDate) {  
251 - this.createDate = createDate;  
252 - }  
253 -  
254 - public Double getTotalMileage() {  
255 - return totalMileage;  
256 - }  
257 -  
258 - public void setTotalMileage(Double totalMileage) {  
259 - this.totalMileage = totalMileage;  
260 - }  
261 -  
262 - public Double getEarlyIntervalLg() {  
263 - return earlyIntervalLg;  
264 - }  
265 -  
266 - public void setEarlyIntervalLg(Double earlyIntervalLg) {  
267 - this.earlyIntervalLg = earlyIntervalLg;  
268 - }  
269 -  
270 - public Double getLateIntervalLg() {  
271 - return lateIntervalLg;  
272 - }  
273 -  
274 - public void setLateIntervalLg(Double lateIntervalLg) {  
275 - this.lateIntervalLg = lateIntervalLg;  
276 - }  
277 -  
278 - public Double getIntervalLg() {  
279 - return intervalLg;  
280 - }  
281 -  
282 - public void setIntervalLg(Double intervalLg) {  
283 - this.intervalLg = intervalLg;  
284 - }  
285 -  
286 - public Double getSpeedLimit() {  
287 - return speedLimit;  
288 - }  
289 -  
290 - public void setSpeedLimit(Double speedLimit) {  
291 - this.speedLimit = speedLimit;  
292 - }  
293 -  
294 - public Integer getLagStation() {  
295 - return lagStation;  
296 - }  
297 -  
298 - public void setLagStation(Integer lagStation) {  
299 - this.lagStation = lagStation;  
300 - }  
301 -  
302 - public Integer getSkip() {  
303 - return skip;  
304 - }  
305 -  
306 - public void setSkip(Integer skip) {  
307 - this.skip = skip;  
308 - }  
309 -  
310 - public Integer getSpeeding() {  
311 - return speeding;  
312 - }  
313 -  
314 - public void setSpeeding(Integer speeding) {  
315 - this.speeding = speeding;  
316 - }  
317 -  
318 - public Integer getCrossedLine() {  
319 - return crossedLine;  
320 - }  
321 -  
322 - public void setCrossedLine(Integer crossedLine) {  
323 - this.crossedLine = crossedLine;  
324 - }  
325 -  
326 - public Integer getOverflights() {  
327 - return overflights;  
328 - }  
329 -  
330 - public void setOverflights(Integer overflights) {  
331 - this.overflights = overflights;  
332 - }  
333 -  
334 - public String getShanghaiLinecode() {  
335 - return shanghaiLinecode;  
336 - }  
337 -  
338 - public void setShanghaiLinecode(String shanghaiLinecode) {  
339 - this.shanghaiLinecode = shanghaiLinecode;  
340 - }  
341 -  
342 - public int getLinePlayType() {  
343 - return linePlayType;  
344 - }  
345 -  
346 - public void setLinePlayType(int linePlayType) {  
347 - this.linePlayType = linePlayType;  
348 - }  
349 -  
350 - public int getRegion() {  
351 - return region;  
352 - }  
353 -  
354 - public void setRegion(int region) {  
355 - this.region = region;  
356 - }  
357 -} 1 +package com.bsth.server_rs.base_info.line;
  2 +
  3 +import com.bsth.server_rs.adapter.DateTimeAdapter;
  4 +
  5 +import javax.xml.bind.annotation.XmlRootElement;
  6 +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
  7 +import java.io.Serializable;
  8 +import java.util.Date;
  9 +
  10 +
  11 +/**
  12 + * @ClassName: Line(线路实体类)
  13 + * @Description: TODO(线路)
  14 + * @Author bsth@lq
  15 + * @Date 2016-4-11 16:06:17
  16 + * @Version 公交调度系统BS版 0.1
  17 + */
  18 +@XmlRootElement
  19 +public class Line implements Serializable {
  20 +
  21 +
  22 + /**线路名称 varchar length(50) 不能为空*/
  23 + private String name;
  24 +
  25 + /** 线路编码 varchar length(50) 不能为空*/
  26 + private String lineCode;
  27 +
  28 + /** 起始站名称*/
  29 + private String startStationName;
  30 +
  31 + /** 终点站名称*/
  32 + private String endStationName;
  33 +
  34 + /** 起始站首班车时间 00:00 */
  35 + private String startStationFirstTime;
  36 +
  37 + /** 起始站末班车时间 00:00 */
  38 + private String startStationEndTime;
  39 +
  40 + /** 终点站首班时间 00:00 */
  41 + private String endStationFirstTime;
  42 +
  43 + /** 终点站末班时间 00:00 */
  44 + private String endStationEndTime;
  45 +
  46 + /** 所属公司 */
  47 + private String company;
  48 +
  49 + /**
  50 + * 所属公司名称
  51 + */
  52 + private String companyName;
  53 +
  54 + /** 分公司 */
  55 + private String brancheCompany;
  56 +
  57 + /** 性质(线路类型) */
  58 + private String nature;
  59 +
  60 + /**线路等级 */
  61 + private String level;
  62 +
  63 + /**是否撤销 <1:是;0:否> */
  64 + private Integer destroy;
  65 +
  66 + /** 是否夜宵线 <1:是;0:否> */
  67 + private Integer supperLine;
  68 +
  69 + /** 设备线路编码 */
  70 + private String eqLinecode;
  71 +
  72 + /**
  73 + * 创建日期 timestamp
  74 + */
  75 + private Date createDate;
  76 +
  77 + //-------------- 标准信息 -----------
  78 + /** 标准总里程 */
  79 + private Double totalMileage;
  80 + /** 早高峰大间隔(分钟) */
  81 + private Double earlyIntervalLg;
  82 +
  83 + /** 晚高峰大间隔(分钟) */
  84 + private Double lateIntervalLg;
  85 +
  86 + /** 平时大间隔(分钟) */
  87 + private Double intervalLg;
  88 +
  89 + /** 限速(平时) */
  90 + private Double speedLimit;
  91 +
  92 + /** 滞站 */
  93 + private Integer lagStation;
  94 +
  95 + /** 越站 */
  96 + private Integer skip;
  97 +
  98 + /** 超速 */
  99 + private Integer speeding;
  100 +
  101 + /** 串线 */
  102 + private Integer crossedLine;
  103 +
  104 + /** 越界 */
  105 + private Integer overflights;
  106 +
  107 + /**
  108 + * 上海市线路编码
  109 + */
  110 + private String shanghaiLinecode;
  111 +
  112 + // 环线或双向
  113 + private int linePlayType;
  114 + // 区内/外
  115 + private int region;
  116 +
  117 + /**
  118 + * 运管处和app上线标识
  119 + * @return
  120 + */
  121 + private int inUse;
  122 +
  123 + public String getName() {
  124 + return name;
  125 + }
  126 +
  127 + public void setName(String name) {
  128 + this.name = name;
  129 + }
  130 +
  131 + public String getLineCode() {
  132 + return lineCode;
  133 + }
  134 +
  135 + public void setLineCode(String lineCode) {
  136 + this.lineCode = lineCode;
  137 + }
  138 +
  139 + public String getStartStationName() {
  140 + return startStationName;
  141 + }
  142 +
  143 + public void setStartStationName(String startStationName) {
  144 + this.startStationName = startStationName;
  145 + }
  146 +
  147 + public String getEndStationName() {
  148 + return endStationName;
  149 + }
  150 +
  151 + public void setEndStationName(String endStationName) {
  152 + this.endStationName = endStationName;
  153 + }
  154 +
  155 + public String getStartStationFirstTime() {
  156 + return startStationFirstTime;
  157 + }
  158 +
  159 + public void setStartStationFirstTime(String startStationFirstTime) {
  160 + this.startStationFirstTime = startStationFirstTime;
  161 + }
  162 +
  163 + public String getStartStationEndTime() {
  164 + return startStationEndTime;
  165 + }
  166 +
  167 + public void setStartStationEndTime(String startStationEndTime) {
  168 + this.startStationEndTime = startStationEndTime;
  169 + }
  170 +
  171 + public String getEndStationFirstTime() {
  172 + return endStationFirstTime;
  173 + }
  174 +
  175 + public void setEndStationFirstTime(String endStationFirstTime) {
  176 + this.endStationFirstTime = endStationFirstTime;
  177 + }
  178 +
  179 + public String getEndStationEndTime() {
  180 + return endStationEndTime;
  181 + }
  182 +
  183 + public void setEndStationEndTime(String endStationEndTime) {
  184 + this.endStationEndTime = endStationEndTime;
  185 + }
  186 +
  187 + public String getCompany() {
  188 + return company;
  189 + }
  190 +
  191 + public void setCompany(String company) {
  192 + this.company = company;
  193 + }
  194 +
  195 + public String getCompanyName() {
  196 + return companyName;
  197 + }
  198 +
  199 + public void setCompanyName(String companyName) {
  200 + this.companyName = companyName;
  201 + }
  202 +
  203 + public String getBrancheCompany() {
  204 + return brancheCompany;
  205 + }
  206 +
  207 + public void setBrancheCompany(String brancheCompany) {
  208 + this.brancheCompany = brancheCompany;
  209 + }
  210 +
  211 + public String getNature() {
  212 + return nature;
  213 + }
  214 +
  215 + public void setNature(String nature) {
  216 + this.nature = nature;
  217 + }
  218 +
  219 + public String getLevel() {
  220 + return level;
  221 + }
  222 +
  223 + public void setLevel(String level) {
  224 + this.level = level;
  225 + }
  226 +
  227 + public Integer getDestroy() {
  228 + return destroy;
  229 + }
  230 +
  231 + public void setDestroy(Integer destroy) {
  232 + this.destroy = destroy;
  233 + }
  234 +
  235 + public Integer getSupperLine() {
  236 + return supperLine;
  237 + }
  238 +
  239 + public void setSupperLine(Integer supperLine) {
  240 + this.supperLine = supperLine;
  241 + }
  242 +
  243 + public String getEqLinecode() {
  244 + return eqLinecode;
  245 + }
  246 +
  247 + public void setEqLinecode(String eqLinecode) {
  248 + this.eqLinecode = eqLinecode;
  249 + }
  250 +
  251 + @XmlJavaTypeAdapter(DateTimeAdapter.class)
  252 + public Date getCreateDate() {
  253 + return createDate;
  254 + }
  255 +
  256 + public void setCreateDate(Date createDate) {
  257 + this.createDate = createDate;
  258 + }
  259 +
  260 + public Double getTotalMileage() {
  261 + return totalMileage;
  262 + }
  263 +
  264 + public void setTotalMileage(Double totalMileage) {
  265 + this.totalMileage = totalMileage;
  266 + }
  267 +
  268 + public Double getEarlyIntervalLg() {
  269 + return earlyIntervalLg;
  270 + }
  271 +
  272 + public void setEarlyIntervalLg(Double earlyIntervalLg) {
  273 + this.earlyIntervalLg = earlyIntervalLg;
  274 + }
  275 +
  276 + public Double getLateIntervalLg() {
  277 + return lateIntervalLg;
  278 + }
  279 +
  280 + public void setLateIntervalLg(Double lateIntervalLg) {
  281 + this.lateIntervalLg = lateIntervalLg;
  282 + }
  283 +
  284 + public Double getIntervalLg() {
  285 + return intervalLg;
  286 + }
  287 +
  288 + public void setIntervalLg(Double intervalLg) {
  289 + this.intervalLg = intervalLg;
  290 + }
  291 +
  292 + public Double getSpeedLimit() {
  293 + return speedLimit;
  294 + }
  295 +
  296 + public void setSpeedLimit(Double speedLimit) {
  297 + this.speedLimit = speedLimit;
  298 + }
  299 +
  300 + public Integer getLagStation() {
  301 + return lagStation;
  302 + }
  303 +
  304 + public void setLagStation(Integer lagStation) {
  305 + this.lagStation = lagStation;
  306 + }
  307 +
  308 + public Integer getSkip() {
  309 + return skip;
  310 + }
  311 +
  312 + public void setSkip(Integer skip) {
  313 + this.skip = skip;
  314 + }
  315 +
  316 + public Integer getSpeeding() {
  317 + return speeding;
  318 + }
  319 +
  320 + public void setSpeeding(Integer speeding) {
  321 + this.speeding = speeding;
  322 + }
  323 +
  324 + public Integer getCrossedLine() {
  325 + return crossedLine;
  326 + }
  327 +
  328 + public void setCrossedLine(Integer crossedLine) {
  329 + this.crossedLine = crossedLine;
  330 + }
  331 +
  332 + public Integer getOverflights() {
  333 + return overflights;
  334 + }
  335 +
  336 + public void setOverflights(Integer overflights) {
  337 + this.overflights = overflights;
  338 + }
  339 +
  340 + public String getShanghaiLinecode() {
  341 + return shanghaiLinecode;
  342 + }
  343 +
  344 + public void setShanghaiLinecode(String shanghaiLinecode) {
  345 + this.shanghaiLinecode = shanghaiLinecode;
  346 + }
  347 +
  348 + public int getLinePlayType() {
  349 + return linePlayType;
  350 + }
  351 +
  352 + public void setLinePlayType(int linePlayType) {
  353 + this.linePlayType = linePlayType;
  354 + }
  355 +
  356 + public int getRegion() {
  357 + return region;
  358 + }
  359 +
  360 + public void setRegion(int region) {
  361 + this.region = region;
  362 + }
  363 +
  364 + public int getInUse() {
  365 + return inUse;
  366 + }
  367 +
  368 + public void setInUse(int inUse) {
  369 + this.inUse = inUse;
  370 + }
  371 +}
src/main/java/com/bsth/server_rs/base_info/section/LD_SectionRestService.java
@@ -28,6 +28,12 @@ public class LD_SectionRestService { @@ -28,6 +28,12 @@ public class LD_SectionRestService {
28 LD_SectionBufferData sectionBufferData; 28 LD_SectionBufferData sectionBufferData;
29 29
30 @GET 30 @GET
  31 + @Path("/all")
  32 + public Map<String, Collection<LD_SectionRoute>> findAll(){
  33 + return LD_SectionBufferData.findAllRoute();
  34 + }
  35 +
  36 + @GET
31 @Path("/{company}") 37 @Path("/{company}")
32 public Map<String, Collection<LD_SectionRoute>> findByCompany(@PathParam("company") String company){ 38 public Map<String, Collection<LD_SectionRoute>> findByCompany(@PathParam("company") String company){
33 return sectionBufferData.findRouteByCompany(company); 39 return sectionBufferData.findRouteByCompany(company);
src/main/java/com/bsth/server_rs/base_info/station/StationRestService.java
@@ -21,6 +21,12 @@ import java.util.Map; @@ -21,6 +21,12 @@ import java.util.Map;
21 public class StationRestService { 21 public class StationRestService {
22 22
23 @GET 23 @GET
  24 + @Path("/all")
  25 + public Map<String, Collection<StationRotue>> findAll(){
  26 + return StationBufferData.findAllRoute();
  27 + }
  28 +
  29 + @GET
24 @Path("/{company}") 30 @Path("/{company}")
25 public Map<String, Collection<StationRotue>> findByCompany(@PathParam("company") String company){ 31 public Map<String, Collection<StationRotue>> findByCompany(@PathParam("company") String company){
26 return StationBufferData.findRouteByCompany(company); 32 return StationBufferData.findRouteByCompany(company);