GeoDataController.java
5.5 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
package com.bsth.controller.geo_data;
import com.bsth.entity.geo_data.GeoRoad;
import com.bsth.entity.geo_data.GeoStation;
import com.bsth.service.geo_data.GeoDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* Created by panzhao on 2017/12/7.
*/
@RestController
@RequestMapping("/_geo_data")
public class GeoDataController {
@Autowired
GeoDataService geoDataService;
@RequestMapping("findGeoStations")
public Map<String, Object> findGeoStations(@RequestParam String lineCode, Integer version){
return geoDataService.findGeoStations(lineCode, version);
}
@RequestMapping("findGeoStationsDir")
public Map<String, Object> findGeoStationsDir(@RequestParam String lineCode, Integer version, Integer dir){
return geoDataService.findGeoStations(lineCode, version, dir);
}
@RequestMapping("findGeoRoad")
public Map<String, Object> findGeoRoad(@RequestParam String lineCode,Integer version){
return geoDataService.findGeoRoad(lineCode, version);
}
@RequestMapping(value = "updateBufferInfo",method = RequestMethod.POST)
public Map<String, Object> updateBufferInfo(GeoStation station){
return geoDataService.updateBufferInfo(station);
}
@RequestMapping(value = "updateStationName",method = RequestMethod.POST)
public Map<String, Object> updateStationName(@RequestParam Map<String, Object> map){
return geoDataService.updateStationName(map);
}
@RequestMapping(value = "addNewStationRoute",method = RequestMethod.POST)
public Map<String, Object> addNewStationRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown
,@RequestParam String stationName,@RequestParam Float lat,@RequestParam Float lng,@RequestParam int prevRouteId,
@RequestParam String addType,@RequestParam String citeStationCode,@RequestParam Long citeStationId){
return geoDataService.addNewStationRoute(lineCode, upDown, versions, stationName, lat, lng, prevRouteId, addType, citeStationCode, citeStationId);
}
@RequestMapping(value = "addNewRoadRoute",method = RequestMethod.POST)
public Map<String, Object> addNewRoadRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown
,@RequestParam String sectionName,@RequestParam String crosesRoad,@RequestParam String coords,@RequestParam int prevRouteId){
return geoDataService.addNewRoadRoute(lineCode, upDown, versions, sectionName, crosesRoad, coords, prevRouteId);
}
@RequestMapping(value = "destroyStation",method = RequestMethod.POST)
public Map<String, Object> destroyStation(GeoStation station){
return geoDataService.destroyStation(station);
}
@RequestMapping(value = "updateRoadInfo",method = RequestMethod.POST)
public Map<String, Object> updateRoadInfo(GeoRoad road){
return geoDataService.updateRoadInfo(road);
}
@RequestMapping(value = "destroyRoad",method = RequestMethod.POST)
public Map<String, Object> destroyRoad(GeoRoad road){
return geoDataService.destroyRoad(road);
}
@RequestMapping("findVersionInfo")
public Map<String, Object> findVersionInfo(@RequestParam String lineCode){
return geoDataService.findVersionInfo(lineCode);
}
@RequestMapping(value = "addNewLineVersion",method = RequestMethod.POST)
public Map<String, Object> addNewLineVersion(@RequestParam Map<String, Object> map){
return geoDataService.addNewLineVersion(map);
}
@RequestMapping(value = "deleteLineVersion",method = RequestMethod.POST)
public Map<String, Object> deleteLineVersion(@RequestParam String lineCode,@RequestParam int version){
return geoDataService.deleteLineVersion(lineCode, version);
}
@RequestMapping("findFutureVersion")
public Map<String, Object> findFutureVersion(@RequestParam String lineCode){
return geoDataService.findFutureVersion(lineCode);
}
@RequestMapping(value = "addEnableInfo",method = RequestMethod.POST)
public Map<String, Object> addEnableInfo(@RequestParam String lineCode,@RequestParam int versions, @RequestParam String startDate){
return geoDataService.addEnableInfo(lineCode, versions, startDate);
}
@RequestMapping(value = "batchDestroyLsStationRout", method = RequestMethod.POST)
public Map<String, Object> batchDestroyLsStationRout(@RequestParam String ids,@RequestParam String lineCode,@RequestParam int upDown,@RequestParam int versions) {
return geoDataService.batchDestroyLsStationRout(ids,lineCode,upDown,versions);
}
@RequestMapping(value = "batchDestroyLsSectionRout", method = RequestMethod.POST)
public Map<String, Object> batchDestroyLsSectionRout(@RequestParam String ids,@RequestParam String lineCode,@RequestParam int upDown,@RequestParam int versions) {
return geoDataService.batchDestroyLsSectionRout(ids,lineCode,upDown,versions);
}
@RequestMapping(value = "matchStationList",method = RequestMethod.GET)
public Map<String, Object> matchStationList(@RequestParam Map<String, Object> map) {
return geoDataService.matchStationList(map);
}
}