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

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

/**
 * @Author: sunxiang
 * @Date: 2018/12/24 17:23
 * @Description:
 **/
@Controller
@RequestMapping(value="/topic/water/shuiqing/")
public class ShuiQingController {

    @Autowired
    private IShuiQingService shuiQingService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("topic/water/floodAndDry/shuiqing");
        return modelAndView;
    }


    /*
    *@Description 本市各水库蓄水量与多年均值比较
    *@Param
    *@Date 2018/12/24
    *@return
    **/
    @RequestMapping(value="getbenshigeshuikuxushuiliangyuduonianjunzhibijiao.action")
    @ResponseBody
    public ResultState getbenshigeshuikuxushuiliangyuduonianjunzhibijiao(){
        return shuiQingService.getbenshigeshuikuxushuiliangyuduonianjunzhibijiao();
    }

 /*
    *@Description 本市各水库蓄水能力
    *@Param
    *@Date 2018/12/24
    *@return
    **/
    @RequestMapping(value="getgeshigeshuikuxushuinengli.action")
    @ResponseBody
    public ResultState getgeshigeshuikuxushuinengli(){
        return shuiQingService.getgeshigeshuikuxushuinengli();
    }


    /*
    *@Description 全省各水库本年蓄水变化
    *@Param
    *@Date 2018/12/24
    *@return
    **/
     @RequestMapping(value="getquanshenggeshuikuxushuiliangbianhua.action")
    @ResponseBody
    public ResultState getquanshenggeshuikuxushuiliangbianhua(){
        return shuiQingService.getquanshenggeshuikuxushuiliangbianhua();
    }

 /*
    *@Description 全省各水库蓄水能力
    *@Param
    *@Date 2018/12/24
    *@return
    **/
     @RequestMapping(value="getquanshenggeshuikuxushuinengli.action")
    @ResponseBody
    public ResultState getquanshenggeshuikuxushuinengli(){
        return shuiQingService.getquanshenggeshuikuxushuinengli();
    }

 /*
    *@Description 降雨量分析比较
    *@Param
    *@Date 2018/12/24
    *@return
    **/
     @RequestMapping(value="getjiangyuliangfenxibijiao.action")
    @ResponseBody
    public PageReturnModel getjiangyuliangfenxibijiao(STRainSearchModel stRainSearchModel){
         stRainSearchModel.automaticPageNo();
        return shuiQingService.getjiangyuliangfenxibijiao(stRainSearchModel);
    }



}
