LineConfigController.java
3 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
package com.bsth.controller.realcontrol;
import com.bsth.controller.BaseController;
import com.bsth.entity.realcontrol.LineConfig;
import com.bsth.service.realcontrol.LineConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequestMapping("/lineConfig")
public class LineConfigController extends BaseController<LineConfig, Integer>{
@Autowired
LineConfigService lineConfigService;
/**
* 检查是否有线路配置信息
* @param codeArray
* @return
*/
@RequestMapping("/check")
public Map<String, Object> check(@RequestParam String[] codeArray){
return lineConfigService.check(codeArray);
}
/**
* 初始化线路配置
* @param lineCode
* @return
* @throws Exception
*/
@RequestMapping("/init/{lineCode}")
public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{
return lineConfigService.init(lineCode);
}
/**
* 修改班次刷新时间
* @param time
* @param lineCode
* @return
*/
@RequestMapping(value = "/editTime", method = RequestMethod.POST)
public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){
return lineConfigService.editStartOptTime(time, lineCode);
}
/**
* 修改出场时间类型
* @param lineCode
* @param type
* @return
*/
@RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST)
public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type,@RequestParam String parkCode,@RequestParam String stationCode){
return lineConfigService.editOutTimeType(lineCode, type, parkCode, stationCode);
}
/**
* 启用原线路回场
* @param lineCode
* @param enable
* @return
*/
@RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST)
public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){
return lineConfigService.enableInParkForSource(lineCode, enable);
}
/**
* 根据线路编码获取配置信息
* @param lineCode
* @return
*/
@RequestMapping(value = "/getByLineCode")
public LineConfig getByLineCode(@RequestParam String lineCode){
return lineConfigService.getByLineCode(lineCode);
}
/**
* 到站缓冲区设置
* @param lineCode
* @param field
* @param value
* @return
*/
@RequestMapping(value = "/bufferTimeDiff", method = RequestMethod.POST)
public Map<String, Object> bufferTimeDiff(@RequestParam String lineCode, @RequestParam String field,@RequestParam String value){
return lineConfigService.bufferTimeDiff(lineCode, field, value);
}
/**
* 应急停靠设置
* @param map
* @return
*/
@RequestMapping(value = "/yjtkSet", method = RequestMethod.POST)
public Map<String, Object> yjtkSet(@RequestParam Map<String, String> map){
//System.out.println(map);
return lineConfigService.yjtkSet(map);
}
}