LineConfigController.java
1.99 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
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;
@RequestMapping("/check")
public Map<String, Object> check(@RequestParam String[] codeArray){
return lineConfigService.check(codeArray);
}
@RequestMapping("/init/{lineCode}")
public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{
return lineConfigService.init(lineCode);
}
@RequestMapping(value = "/editTime", method = RequestMethod.POST)
public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){
return lineConfigService.editStartOptTime(time, lineCode);
}
@RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST)
public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type){
return lineConfigService.editOutTimeType(lineCode, type);
}
@RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST)
public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){
return lineConfigService.enableInParkForSource(lineCode, enable);
}
@RequestMapping(value = "/getByLineCode")
public LineConfig getByLineCode(@RequestParam String lineCode){
return lineConfigService.getByLineCode(lineCode);
}
@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);
}
}