package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.model.ResultState;
import com.lightinit.hsdatashow.model.admin.ChartModel;
import com.lightinit.hsdatashow.service.admin.IEnergyService;
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.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: sunxiang
 * @Date: 2018/7/26 13:57
 * @Description: 能源运行
 **/
@Controller
@RequestMapping(value = "/admin/energy")
public class EnergyController {

    @Autowired
    private IEnergyService energyService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/energy1/index");
        return modelAndView;
    }

    /*
    *@Description  能源消耗总量分析
    *@Param
    *@Date 2018/8/6
    *@return 
    **/
    @RequestMapping(value = "engeryTotal.action")
    @ResponseBody
    public ResultState getEngeryTotal(){
        return energyService.getEngeryTotal();
    }

    /*
    *@Description 能源消耗占比分析
    *@Param
    *@Date 2018/8/6
    *@return
    **/
    @RequestMapping(value = "engeryScale.action")
    @ResponseBody
    public ResultState getEngeryScale(){
        return energyService.getEngeryScale();
    }

    /*
    *@Description 污染、清洁能源比重分析
    *@Param
    *@Date 2018/8/6
    *@return
    **/
    @RequestMapping(value = "cleanAndpollute.action")
    @ResponseBody
    public ResultState getCleanAndpollute(){
        return energyService.getCleanAndpollute();
    }

    /*
    *@Description 新能源基础设施
    *@Param
    *@Date 2018/8/6
    *@return
    **/
    @RequestMapping(value = "newenergyinfrastructure.action")
    @ResponseBody
    public ResultState getNewenergyInfrastructure(){
        return energyService.getNewenergyInfrastructure();
    }
    
    /*
    *@Description 原煤消耗分析
    *@Param 
    *@Date 2018/8/7
    *@return 
    **/
    @RequestMapping(value = "coalconsume.action")
    @ResponseBody
    public ResultState getCoalconsume(){
        return energyService.getCoalconsume();
    }

    /*
    *@Description 电力消耗对比分析
    *@Param
    *@Date 2018/8/7
    *@return
    **/
    @RequestMapping(value = "electricconsume.action")
    @ResponseBody
    public ResultState getElectricConsume(){
        return energyService.getElectricConsume();
    }
}
