SectionController.java
2.43 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
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="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(查询路段编码)
*
* @return int <sectionCode路段编码>
*/
@RequestMapping(value="getSectionCode" , method = RequestMethod.GET)
public long getSectionCode() {
return GetUIDAndCode.getSectionId();
}
}