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.ICommunicationService;
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;
import java.util.LinkedHashMap;

/**
 * @Author: sunxiang
 * @Date: 2018/7/26 18:17
 * @Description:
 **/
@Controller
@RequestMapping(value = "/admin/commu")
public class CommunicationController {

    @Autowired
    private ICommunicationService communicationService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/communication/index");
        return modelAndView;
    }

    /*@Description 视频监控
    *@Param
    *@Date 2018/8/7
    *@return
    */
    @RequestMapping(value = "videomonitor.action")
    @ResponseBody
    public ResultState getVideoMonitor(){
        return communicationService.getVideoMonitor();
    }

    /*@Description 电视和wifi开通情况
    *@Param
    *@Date 2018/8/7
    *@return
    */
    @RequestMapping(value = "tvandwifi.action")
    @ResponseBody
    public ResultState getTVAndWifi(){
        return communicationService.getTVAndWifi();
    }

    /*
    *@Description 通信故障
    *@Param 
    *@Date 2018/8/8
    *@return 
    **/
    @RequestMapping(value = "areacommbreak.action")
    @ResponseBody
    public ResultState getAreaCommBreak(){
        return communicationService.getAreaCommBreak();
    }


    /*
    *@Description   故障占比
    *@Param
    *@Date 2018/8/8
    *@return
    **/
    @RequestMapping(value = "areacommbreakprop.action")
    @ResponseBody
    public ResultState getAreaCommBreakProp(){
        return communicationService.getAreaCommBreakProp();
    }

    /*@Description 光纤长度
     *@Param
     *@Date 2018/8/7
     *@return
     */
    @RequestMapping(value = "fiber.action")
    @ResponseBody
    public ResultState getFiber(){
        return communicationService.getFiber();
    }

}
