package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.dictionary.DicCategoryIndex;
import com.lightinit.hsdatashow.model.ResultState;
import com.lightinit.hsdatashow.service.admin.IBuildingService;
import com.lightinit.hsdatashow.service.admin.ICockpitService;
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.ArrayList;

/**
 * @Author: sunxiang
 * @Date: 2018/8/14 15:01
 * @Description:
 **/
@Controller
@RequestMapping(value = "/admin/building")
public class BuildingController {


    @Autowired
    private IBuildingService buildingService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/building/index");
        return modelAndView;
    }


      /*
      *@Description 项目分布
      *@Param
      *@Date 2018/12/8
      *@return
      **/
    @RequestMapping(value = "project.action")
    @ResponseBody
    public ResultState getProjec(){
        return buildingService.getProjec();
    }
    /*
      *@Description 项目进展分析
      *@Param
      *@Date 2018/12/8
      *@return
      **/
    @RequestMapping(value = "projectanalysis.action")
    @ResponseBody
    public ResultState getProjectAnalyse(){
        return buildingService.getProjectAnalysis();
    }
    /*
      *@Description 项目类型
      *@Param
      *@Date 2018/12/8
      *@return
      **/
    @RequestMapping(value = "projectType.action")
    @ResponseBody
    public ResultState getProjectType(){
        return buildingService.getProjectType();
    }
    /*
      *@Description 投资项目统计
      *@Param
      *@Date 2018/12/8
      *@return
      **/
    @RequestMapping(value = "projectStatistics.action")
    @ResponseBody
    public ResultState getProjectStatistics(){
        return buildingService.getProjectStatistics();
    }
    /*
      *@Description 项目事故分析
      *@Param
      *@Date 2018/12/8
      *@return
      **/
    @RequestMapping(value = "projectAccidentAnalyse.action")
    @ResponseBody
    public ResultState getProjectAccidentAnalyser(){
        return buildingService.getProjectAccidentAnalyser();
    }

}
