InOutScheduleController.java 1.9 KB
package com.bsth.controller.schedule;

import com.bsth.data.schedule.dto.ScheduleInOut;
import com.bsth.service.schedule.ScheduleService;
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 java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created by panzhao on 2017/9/4.
 */
@RestController
@RequestMapping("in_out")
public class InOutScheduleController {

    @Autowired
    ScheduleService inOutScheduleService;

    @RequestMapping("all")
    public Collection<ScheduleInOut> all(){
        return inOutScheduleService.findAll();
    }

    @RequestMapping("all_out")
    public List<ScheduleInOut> all_out(){
        return inOutScheduleService.all_out();
    }

    @RequestMapping("findOutByIdx")
    public List<ScheduleInOut> findOutByIdx(@RequestParam String idx){
        return inOutScheduleService.findOutByIdx(idx);
    }

    @RequestMapping("findAbnormalByLineArray")
    public Map<String, Object> findAbnormalByLineArray(@RequestParam String idx){
        return inOutScheduleService.findAbnormalByLineArray(idx);
    }

    @RequestMapping("findSchByLpName")
    public Map<String, Object> findSchByLpName(@RequestParam String lineCode, @RequestParam String lpName){
        return inOutScheduleService.findSchByLpName(lineCode, lpName);
    }

    @RequestMapping(value = "dftz", method = RequestMethod.POST)
    public Map<String, Object> dftz(@RequestParam Map<String, Object> map){
        return inOutScheduleService.dftz(map);
    }

    @RequestMapping(value = "tzrc", method = RequestMethod.POST)
    public Map<String, Object> tzrc(@RequestParam String cpcsJson){
        return inOutScheduleService.tzrc(cpcsJson);
    }
}