Commit 8cedaf34dce6f38b493a7f5a35307e7d57f3d333
1 parent
fe89d111
1.加入导航点位信息接口(常规、绕改道)
Showing
5 changed files
with
76 additions
and
8 deletions
src/main/java/com/bsth/CXFConfig.java
| ... | ... | @@ -5,6 +5,7 @@ import com.bsth.server_rs.AuthorizeInterceptor_IN; |
| 5 | 5 | import com.bsth.server_rs.base_info.car.CarRestService; |
| 6 | 6 | import com.bsth.server_rs.base_info.carpark.CarparkRestService; |
| 7 | 7 | import com.bsth.server_rs.base_info.line.LineRestService; |
| 8 | +import com.bsth.server_rs.base_info.navigation.NavigationRestService; | |
| 8 | 9 | import com.bsth.server_rs.base_info.person.PersonRestService; |
| 9 | 10 | import com.bsth.server_rs.base_info.section.LD_RoadSpeedRestService; |
| 10 | 11 | import com.bsth.server_rs.base_info.section.LD_SectionRestService; |
| ... | ... | @@ -152,6 +153,9 @@ public class CXFConfig { |
| 152 | 153 | @Autowired |
| 153 | 154 | private StationPassengerService stationPassengerService; |
| 154 | 155 | |
| 156 | + @Autowired | |
| 157 | + private NavigationRestService navigationRestService; | |
| 158 | + | |
| 155 | 159 | @Bean |
| 156 | 160 | public Server rsServer() { |
| 157 | 161 | JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean(); |
| ... | ... | @@ -183,7 +187,8 @@ public class CXFConfig { |
| 183 | 187 | manHoursRestService, |
| 184 | 188 | bxRestService, |
| 185 | 189 | externalRestService, |
| 186 | - stationPassengerService)); | |
| 190 | + stationPassengerService, | |
| 191 | + navigationRestService)); | |
| 187 | 192 | endpoint.setProviders(Arrays.asList(new JacksonJsonProvider(), new AesExceptionMapper())); |
| 188 | 193 | //endpoint.setFeatures(Arrays.asList(new Swagger2Feature())); |
| 189 | 194 | endpoint.getInInterceptors().add(authorizeInterceptorIn); | ... | ... |
src/main/java/com/bsth/entity/Point.java
0 → 100644
| 1 | +package com.bsth.entity; | |
| 2 | + | |
| 3 | +public class Point { | |
| 4 | + | |
| 5 | + /** | |
| 6 | + * 是否为站点 | |
| 7 | + */ | |
| 8 | + private boolean isStation; | |
| 9 | + | |
| 10 | + /** | |
| 11 | + * 纬度 | |
| 12 | + */ | |
| 13 | + private double lat; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 经度 | |
| 17 | + */ | |
| 18 | + private double lon; | |
| 19 | + | |
| 20 | + public boolean isStation() { | |
| 21 | + return isStation; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void setStation(boolean station) { | |
| 25 | + isStation = station; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public double getLat() { | |
| 29 | + return lat; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setLat(double lat) { | |
| 33 | + this.lat = lat; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public double getLon() { | |
| 37 | + return lon; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setLon(double lon) { | |
| 41 | + this.lon = lon; | |
| 42 | + } | |
| 43 | +} | ... | ... |
src/main/java/com/bsth/server_rs/base_info/station/buffer/StationRefreshThread.java
| ... | ... | @@ -35,7 +35,7 @@ public class StationRefreshThread extends Thread{ |
| 35 | 35 | StationBufferData.replaceAll(stationList); |
| 36 | 36 | |
| 37 | 37 | //站点路由信息 |
| 38 | - List<StationRotue> routeList = jdbcTemplate.query("select id, line, station_route_code, line_code,station_code,station_mark,distances, to_time,directions,station_name,shaped_type as shapes_type,radius,ST_AsText(buffer_polygon_wgs) AS polygon_grid from bsth_c_stationroute where destroy=0", | |
| 38 | + List<StationRotue> routeList = jdbcTemplate.query("select id, line, station_route_code, line_code,station_code,station_mark,distances, to_time,directions,station_name,shaped_type as shapes_type,radius,ST_AsText(buffer_polygon_wgs) AS polygon_grid,ST_X(center_point_wgs) AS lon,ST_Y(center_point_wgs) AS lat from bsth_c_stationroute where destroy=0", | |
| 39 | 39 | BeanPropertyRowMapper.newInstance(StationRotue.class)); |
| 40 | 40 | |
| 41 | 41 | for(StationRotue sr : routeList){ | ... | ... |
src/main/java/com/bsth/server_rs/base_info/station/entity/Station.java
| ... | ... | @@ -13,10 +13,10 @@ public class Station { |
| 13 | 13 | private String stationName; |
| 14 | 14 | |
| 15 | 15 | /** WGS 经度 */ |
| 16 | - private Float lon; | |
| 16 | + private Double lon; | |
| 17 | 17 | |
| 18 | 18 | /** WGS 纬度 */ |
| 19 | - private Float lat; | |
| 19 | + private Double lat; | |
| 20 | 20 | |
| 21 | 21 | /** 版本号 */ |
| 22 | 22 | private Integer versions; |
| ... | ... | @@ -46,19 +46,19 @@ public class Station { |
| 46 | 46 | this.stationCode = stationCode; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public Float getLon() { | |
| 49 | + public Double getLon() { | |
| 50 | 50 | return lon; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - public void setLon(Float lon) { | |
| 53 | + public void setLon(Double lon) { | |
| 54 | 54 | this.lon = lon; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - public Float getLat() { | |
| 57 | + public Double getLat() { | |
| 58 | 58 | return lat; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public void setLat(Float lat) { | |
| 61 | + public void setLat(Double lat) { | |
| 62 | 62 | this.lat = lat; |
| 63 | 63 | } |
| 64 | 64 | } | ... | ... |
src/main/java/com/bsth/server_rs/base_info/station/entity/StationRotue.java
| ... | ... | @@ -59,6 +59,10 @@ public class StationRotue { |
| 59 | 59 | /** 多边形 WGS 坐标 */ |
| 60 | 60 | private String polygonGrid; |
| 61 | 61 | |
| 62 | + private Double lon; | |
| 63 | + | |
| 64 | + private Double lat; | |
| 65 | + | |
| 62 | 66 | public String getLineCode() { |
| 63 | 67 | return lineCode; |
| 64 | 68 | } |
| ... | ... | @@ -178,4 +182,20 @@ public class StationRotue { |
| 178 | 182 | public void setPolygonGrid(String polygonGrid) { |
| 179 | 183 | this.polygonGrid = polygonGrid; |
| 180 | 184 | } |
| 185 | + | |
| 186 | + public Double getLon() { | |
| 187 | + return lon; | |
| 188 | + } | |
| 189 | + | |
| 190 | + public void setLon(Double lon) { | |
| 191 | + this.lon = lon; | |
| 192 | + } | |
| 193 | + | |
| 194 | + public Double getLat() { | |
| 195 | + return lat; | |
| 196 | + } | |
| 197 | + | |
| 198 | + public void setLat(Double lat) { | |
| 199 | + this.lat = lat; | |
| 200 | + } | |
| 181 | 201 | } | ... | ... |