StationController.java 1.82 KB
package com.bsth.controller;

import java.util.Map;

import org.hibernate.annotations.Parameter;
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.alibaba.fastjson.JSONArray;
import com.bsth.entity.Station;
import com.bsth.service.StationService;

/**
 * 
 * @ClassName: StationController(站点控制器)
 * 
 * @Extends : BaseController
 * 
 * @Description: TODO(站点控制层)
 * 
 * @Author bsth@lq
 * 
 * @Date 2016年05月03日 上午9:21:17
 *
 * @Version 公交调度系统BS版 0.1
 * 
 */

@RestController
@RequestMapping("station")
public class StationController extends BaseController<Station, Integer> {
	
	@Autowired
	private StationService service;
	
	@RequestMapping(value="collectionSave" , method = RequestMethod.POST)
	public Map<String, Object> collectionSave(@RequestParam Map<String, Object> map) {
		
		return service.systemSaveStations(map);
		
	}
	
	@RequestMapping(value="stationSave" , method = RequestMethod.POST)
	public Map<String, Object> stationSave(@RequestParam Map<String, Object> map) {
		
		map.put("createBy", "");
		
		map.put("updateBy", "");
		
		return service.stationSaveMap(map);
		
	}
	
	@RequestMapping(value="stationUpdate" , method = RequestMethod.POST)
	public Map<String, Object> stationUpdate(@RequestParam Map<String, Object> map) {
		
		map.put("updateBy", "");
		
		return service.stationUpdate(map);
		
	}
	
	@RequestMapping(value="getStationCode" , method = RequestMethod.GET)
	public int getStationCode() {
		
		return service.getStationCode();
		
	}
}