package incheon.sgp.rst.web;


import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import incheon.sgp.rst.service.RstPpltnService;
import incheon.sgp.rst.vo.RstPpltnVO;
import lombok.RequiredArgsConstructor;

/**
 * @ClassName : RstPpltnController.java
 * @Description : 전입/전출 인구통계 컨트롤러
 *
 * @author : 이주훈
 * @since : 2025. 11. 06
 * @version : 1.0
 *
 */
@Controller
@RequestMapping("/sgp/rst")
@RequiredArgsConstructor
public class RstPpltnController {
	
	private final RstPpltnService rstPpltnService;
	
	@GetMapping("/ppltn/getCrtrYmRangePpltn.do")
	@ResponseBody
	public Map<String, Object> getMaxCrtrYm() {
	    return rstPpltnService.getCrtrYmRangePpltn();
	}
	
    @GetMapping("/ppltn/mvInList.do")
    @ResponseBody
    public List<RstPpltnVO> mvInList(RstPpltnVO vo) {
        return rstPpltnService.selectMvInList(vo);
    }
    
    @GetMapping("/ppltn/mvOutList.do")
    @ResponseBody
    public List<RstPpltnVO> mvOutList(RstPpltnVO vo) {
        return rstPpltnService.selectMvOutList(vo);
    }
}
    
