package com.lightinit.hsdatashow.controller.topic.water;

import com.lightinit.hsdatashow.model.ResultState;
import com.lightinit.hsdatashow.service.topic.water.IDayMonthYearService;
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;

@Controller
@RequestMapping(value = "/topic/water/DayMonthYear")
public class DayMonthYearController {
    @Autowired
    private IDayMonthYearService iDayMonthYearService;
    @RequestMapping(value = "/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("topic/water/wholeCityWater/dayMonthYear") ;
        return modelAndView ;
    }

    /**
     * 昨日用水
     * @return
     */
    @RequestMapping(value = "/getYesterdayYS.action")
    @ResponseBody
    public ResultState getYesterdayYS() {
        return iDayMonthYearService.getYesterdayUsers();
    }
    /**
     * 昨日用水构成
     * @return
     */
    @RequestMapping(value = "/getYesterdayQXYSGC.action")
    @ResponseBody
    public ResultState getYesterdayQXYSGC() {
        return iDayMonthYearService.getYesterdayQXYSGC();
    }

    /**
     * 昨日各行各业用水
     * @return
     */
    @RequestMapping(value = "/getYesterdayGHYYS.action")
    @ResponseBody
    public ResultState getYesterdayGHYYS() {
        return iDayMonthYearService.getYesterdayGHYYS();
    }


    /**
     * 上月用水
     * @return
     */
    @RequestMapping(value = "/getLastMonthYS.action")
    @ResponseBody
    public ResultState getLastMonthYS() {
        return iDayMonthYearService.getLastMonthYS();
    }
    /**
     * 上月用水构成
     * @return
     */
    @RequestMapping(value = "/getLastMonthQXYSGC.action")
    @ResponseBody
    public ResultState getLastMonthQXYSGC() {
        return iDayMonthYearService.getLastMonthQXYSGC();
    }

    /**
     * 上月各行各业用水
     * @return
     */
    @RequestMapping(value = "/getLastMonthGHYYS.action")
    @ResponseBody
    public ResultState getLastMonthGHYYS() {
        return iDayMonthYearService.getLastMonthGHYYS();
    }

    /**
     * 本月用水
     * @return
     */
    @RequestMapping(value = "/getMonthYS.action")
    @ResponseBody
    public ResultState getMonthYS() {
        return iDayMonthYearService.getMonthYS();
    }
    /**
     * 本月用水构成
     * @return
     */
    @RequestMapping(value = "/getMonthQXYSGC.action")
    @ResponseBody
    public ResultState getMonthQXYSGC() {
        return iDayMonthYearService.getMonthQXYSGC();
    }

    /**
     * 本月各行各业用水
     * @return
     */
    @RequestMapping(value = "/getMonthGHYYS.action")
    @ResponseBody
    public ResultState getMonthGHYYS() {
        return iDayMonthYearService.getMonthGHYYS();
    }

    /**
     * 今年用水
     * @return
     */
    @RequestMapping(value = "/getYearYS.action")
    @ResponseBody
    public ResultState getYearYS() {
        return iDayMonthYearService.getYearYS();
    }
    /**
     * 今年用水构成
     * @return
     */
    @RequestMapping(value = "/getYearQXYSGC.action")
    @ResponseBody
    public ResultState getYearQXYSGC() {
        return iDayMonthYearService.getYearQXYSGC();
    }

    /**
     * 今年各行各业用水
     * @return
     */
    @RequestMapping(value = "/getYearGHYYS.action")
    @ResponseBody
    public ResultState getYearGHYYS() {
        return iDayMonthYearService.getYearGHYYS();
    }

}
