package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.entity.Coefficient;
import com.lightinit.hsdatashow.entity.SocialSafety;
import com.lightinit.hsdatashow.model.admin.EducationalPortraitListModel;
import com.lightinit.hsdatashow.model.admin.UnemploymentListModel;
import com.lightinit.hsdatashow.model.admin.UrbanRuralGdpListModel;
import com.lightinit.hsdatashow.service.admin.ILivelihoodImproveService;
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/LivelihoodImprove")
public class LivelihoodImproveController {
    @Autowired
    private ILivelihoodImproveService livelihoodImproveService;
    @RequestMapping(value = "/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/livelihoodImprove/index") ;
        return modelAndView ;
    }
    @ResponseBody
    @RequestMapping(value = "/getUnemployment.action")
    public UnemploymentListModel getUnemployment(){
        return livelihoodImproveService.getUnemployment();
    }

    @ResponseBody
    @RequestMapping(value = "/getUrbanRuralGdp.action")
    public UrbanRuralGdpListModel getUrbanRuralGdp(){
        return livelihoodImproveService.getUrbanRuralGdp();
    }
    @ResponseBody
    @RequestMapping(value = "/getUrbanRuralContrast.action")
    public UrbanRuralGdpListModel getUrbanRuralContrast(){
        return livelihoodImproveService.getUrbanRuralContrast();
    }

    @ResponseBody
    @RequestMapping(value = "/getQuality.action")
    public EducationalPortraitListModel getQuality(){
        return livelihoodImproveService.getQuality();
    }
    @RequestMapping(value = "/getCoefficient.action")
    @ResponseBody
    public List<Coefficient> getCoefficient(){
        List<Coefficient> list =livelihoodImproveService.getCoefficient();
        return list;
    }
    @RequestMapping(value = "/getCoefficient1.action")
    @ResponseBody
    public List<Coefficient> getCoefficient1(){
        List<Coefficient> list =livelihoodImproveService.getCoefficient1();
        return list;
    }
}
