package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.entity.GdpOccupationRatio;
import com.lightinit.hsdatashow.model.ResultState;
import com.lightinit.hsdatashow.model.admin.AgeStructureNameAndValueModel;
import com.lightinit.hsdatashow.model.admin.EconomicDevelopmentListModel;
import com.lightinit.hsdatashow.model.admin.GroupNameAndValueModel;
import com.lightinit.hsdatashow.model.admin.PerCapitaGdpListModel;
import com.lightinit.hsdatashow.service.admin.IEconomicDevelopmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
@RequestMapping(value = "/admin/EconomicDevelopment")
public class EconomicDevelopmentController {
    @Autowired
    private IEconomicDevelopmentService economicDevelopmentService;
    @RequestMapping(value = "/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/economicDevelopment/index") ;
        return modelAndView ;
    }
    @RequestMapping(value = "/getGDP.action")
    @ResponseBody
    public PerCapitaGdpListModel getGDP(){
        PerCapitaGdpListModel model = economicDevelopmentService.getGDP();
        return model;
    }
    @RequestMapping(value = "/getPerCapitaGdp.action")
    @ResponseBody
    public PerCapitaGdpListModel getPerCapitaGdp(){
        PerCapitaGdpListModel model = economicDevelopmentService.getPerCapitaGdp();
        return model;
    }
    @RequestMapping(value = "/getGdpOccupationRatio.action")
    @ResponseBody
    public ResultState getGdpOccupationRatio(){
        ResultState model = economicDevelopmentService.getGdpOccupationRatio();
        return model;
    }

    @RequestMapping(value = "/getLaborProduction.action")
    @ResponseBody
    public PerCapitaGdpListModel getLaborProduction(){
        PerCapitaGdpListModel model = economicDevelopmentService.getLaborProduction();
        return model;
    }
    @RequestMapping(value = "/getUrbanization.action")
    @ResponseBody
    public PerCapitaGdpListModel getUrbanization(){
        PerCapitaGdpListModel model = economicDevelopmentService.getUrbanization();
        return model;
    }
}
