TrafficManageController.java
2.63 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.schedule;
import com.bsth.service.TrafficManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
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;
/**
*
* @author BSTH
*
*/
@RestController
@RequestMapping("trmg")
public class TrafficManageController {
@Autowired
private TrafficManageService trManageService;
@RequestMapping(value = "/setXL", method = RequestMethod.GET)
public String setXL() throws Exception {
try {
return trManageService.setXL();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setCL", method = RequestMethod.GET)
public String setCL() throws Exception {
try {
return trManageService.setCL();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setSJ", method = RequestMethod.GET)
public String setSJ() throws Exception {
try {
return trManageService.setSJ();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setCS", method = RequestMethod.GET)
public String setCS() throws Exception {
try {
return trManageService.setCS();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setSKB", method = RequestMethod.GET)
public String setSKB(@RequestParam("ids") String ids) throws Exception {
try {
return trManageService.setSKB(ids);
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setXLPC", method = RequestMethod.GET)
public String setXLPC() throws Exception {
try {
return trManageService.setXLPC();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
@RequestMapping(value = "/setJHBC", method = RequestMethod.GET)
public String setJHBC() throws Exception {
try {
return trManageService.setDDRB();
} catch (Exception exp) {
throw new Exception(exp.getCause());
}
}
}