SectionController.java
4.07 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
package com.bsth.controller;
import java.util.Map;
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 com.bsth.entity.Section;
import com.bsth.service.SectionService;
import com.bsth.util.GetUIDAndCode;
/**
*
* @ClassName: SectionController(路段控制器)
*
* @Extends : BaseController
*
* @Description: TODO(路段控制层)
*
* @Author bsth@lq
*
* @Date 2016年05月03日 上午9:21:17
*
* @Version 公交调度系统BS版 0.1
*
*/
@RestController
@RequestMapping("section")
public class SectionController extends BaseController<Section, Integer> {
@Autowired
SectionService service;
/**
* 新增路段信息
*
* @param map:<bsectionVector:折线百度坐标集合;dbType:圆坐标类型;descriptions:描述与说明;destroy:是否撤销;directions:方向;lineId:线路ID
*
* lineCode :线路编码;roadCoding:道路编码;sectionCode:路段编码;sectionDistance:路段长度;sectionName:路段名称;sectionTime:路段时长;
*
* sectionrouteCode:路段序号;speedLimit:路段限速>
*
* @return map<SUCCESS:成功;ERROR:异常>
*/
@RequestMapping(value="sectionSave" , method = RequestMethod.POST)
public Map<String, Object> sectionSave(@RequestParam Map<String, Object> map) {
map.put("createBy", "");
map.put("updateBy", "");
return service.sectionSave(map);
}
/**
* @Description :TODO(编辑线路走向)
*
* @param map <sectionId:路段ID; sectionJSON:路段信息>
*
* @return Map<String, Object> <SUCCESS ; ERROR>
*/
@RequestMapping(value="sectionCut" , method = RequestMethod.POST)
public Map<String, Object> sectionCut(@RequestParam Map<String, Object> map) {
map.put("updateBy", "");
map.put("createBy", "");
map.put("createDate", "");
return service.sectionCut(map);
}
/**
* @Description :TODO(编辑线路走向保存到线路历史表)
*
* @param map <sectionId:路段ID; sectionJSON:路段信息>
*
* @return Map<String, Object> <SUCCESS ; ERROR>
*/
@RequestMapping(value="sectionCutSaveLineLS" , method = RequestMethod.POST)
public Map<String, Object> sectionCutSaveLineLS(@RequestParam Map<String, Object> map) {
map.put("updateBy", "");
map.put("createBy", "");
return service.sectionCutSaveLineLS(map);
}
/**
* @Description :TODO(编辑线路走向)
*
* @param map <sectionId:路段ID; sectionJSON:路段信息>
*
* @return Map<String, Object> <SUCCESS ; ERROR>
*/
@RequestMapping(value="sectionUpdate" , method = RequestMethod.POST)
public Map<String, Object> sectionUpdate(@RequestParam Map<String, Object> map) {
map.put("updateBy", "");
map.put("createBy", "");
map.put("createDate", "");
return service.sectionUpdate(map);
}
/**
* @Description :TODO(编辑缓存线路走向)
*/
@RequestMapping(value="sectionCacheUpdate" , method = RequestMethod.POST)
public Map<String, Object> sectionCacheUpdate(@RequestParam Map<String, Object> map) {
map.put("updateBy", "");
map.put("createBy", "");
map.put("createDate", "");
return service.sectionCacheUpdate(map);
}
/**
* @Description :TODO(查询路段编码)
*
* @return int <sectionCode路段编码>
*/
@RequestMapping(value="getSectionCode" , method = RequestMethod.GET)
public long getSectionCode() {
return GetUIDAndCode.getSectionId();
}
/**
* @Description :TODO(把路段截取位双路名路段)
*
* @return int <sectionCode路段编码>
*/
@RequestMapping(value="doubleName" , method = RequestMethod.GET)
public Map<String, Object> doubleName(@RequestParam Map<String, Object> map) {
return service.doubleName(map);
}
}