DirectiveController.java 2.08 KB
package com.bsth.vehicle.directive.controller;

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;

import com.bsth.vehicle.directive.service.DirectiveService;

/**
 * 
 * @ClassName: DirectiveController 
 * @Description: TODO(页面下发调度指令) .0
 * @author PanZhao
 * @date 2016年6月8日 上午9:34:51 
 *
 */
@RestController
@RequestMapping("/directive")
public class DirectiveController {
	
	@Autowired
	DirectiveService directiveService;
	
	/**
	 * 
	 * @Title: send60 
	 * @Description: TODO(60协议短语下发) 
	 * @throws
	 */
	@RequestMapping(value = "/phrase", method = RequestMethod.POST)
	public int send60Phrase(@RequestParam String nbbm, @RequestParam String text){
		return directiveService.send60Phrase(nbbm, text);
	}
	
	/**
	 * 
	 * @Title: send60Dispatch 
	 * @Description: TODO(班次信息下发) 
	 * @param @param id
	 * @throws
	 */
	@RequestMapping(value = "/dispatch", method = RequestMethod.POST)
	public int send60Dispatch(@RequestParam Long id){
		return directiveService.send60Dispatch(id);
	}
	
	/**
	 * 
	 * @Title: lineChange 
	 * @Description: TODO(切换线路) 
	 * @param @param nbbm 车辆内部编码
	 * @param @param lineId 新线路编码
	 * @throws
	 */
	@RequestMapping(value = "/lineChnage", method = RequestMethod.POST)
	public int lineChange(@RequestParam String nbbm, @RequestParam Integer lineId){
		return directiveService.lineChange(nbbm, lineId);
	}
	
	/**
	 * 
	 * @Title: upDownChange 
	 * @Description: TODO(上下行切换) 
	 * @param @param nbbm 车辆内部编码
	 * @param @param upDon
	 * @throws
	 */
	@RequestMapping(value = "/upDownChange", method = RequestMethod.POST)
	public int upDownChange(@RequestParam String nbbm, @RequestParam Integer upDown){
		return directiveService.upDownChange(nbbm, upDown);
	}
}