package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.model.admin.GreenNameAndValueModel;
import com.lightinit.hsdatashow.service.admin.INoiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.math.BigDecimal;

@Controller
@RequestMapping(value = "/admin/noise")
public class NoiseController {

    @Autowired
    private INoiseService noiseService ;

    @RequestMapping("/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/noise/index") ;
        return modelAndView ;
    }

    @RequestMapping("/getNoiseRegion.action")
    @ResponseBody
    public BigDecimal getGreenCity(){
        BigDecimal value = noiseService.getNoiseRegion() ;
        return value ;
    }

    @RequestMapping("/getNoiseTraffic.action")
    @ResponseBody
    public BigDecimal getNoiseTraffic(){
        BigDecimal value = noiseService.getNoiseTraffic() ;
        return value ;
    }

}
