TrafficManageController.java 2.63 KB
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());
        }
    }
}