TrafficManageController.java 4.99 KB
package com.bsth.controller.schedule;

import com.bsth.service.TrafficManageService;

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;

/**
 *
 * @author BSTH
 *
 */
@RestController
@RequestMapping("trmg")
public class TrafficManageController {

    @Autowired
    private TrafficManageService trManageService;


    @RequestMapping(value = "/setXL", method = RequestMethod.GET)
    public String setXL(@RequestParam("ids") String ids) throws Exception {
        try {
            return trManageService.setXL(ids);
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setXLByInUse", method = RequestMethod.GET)
    public String setXLByInUse(@RequestParam("inUse") String inUse) throws Exception {
        try {
            return trManageService.setXLByInUse(inUse);
        } 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 = "/setLD", method = RequestMethod.GET)
    public String setLD() throws Exception {
        try {
            return trManageService.setLD();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setLDByDate", method = RequestMethod.GET)
    public String setLDByDate(@RequestParam("theDate") String theDate) throws Exception {
        try {
            return trManageService.setLD(theDate);
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setLDFile", method = RequestMethod.GET)
    public String setLDFile() throws Exception {
        try {
            return trManageService.setLDFile();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setLCYH", method = RequestMethod.GET)
    public String setLCYH() throws Exception {
        try {
            return trManageService.setLCYH();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setDDRB", method = RequestMethod.GET)
    public String setDDRB() throws Exception {
        try {
            return trManageService.setDDRB();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setJHBC", method = RequestMethod.GET)
    public String setJHBC() throws Exception {
        try {
            return trManageService.setJHBC();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/setJHBCByDate", method = RequestMethod.GET)
    public String setJHBCByDate(@RequestParam("theDate") String theDate) throws Exception {
        try {
            return trManageService.setJHBC(theDate);
        } 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 = "/setCS", method = RequestMethod.GET)
    public String setCS() throws Exception {
        try {
            return trManageService.setCS();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

    @RequestMapping(value = "/getDownLoadAllDataFile", method = RequestMethod.GET)
    public String getDownLoadAllDataFile() throws Exception {
        try {
            return trManageService.getDownLoadAllDataFile();
        } catch (Exception exp) {
            throw new Exception(exp.getCause());
        }
    }

}