package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.model.ResultState;
import com.lightinit.hsdatashow.service.admin.ISocietySecurityService;
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/8/2 16:35
 * @Description:
 **/
@Controller
@RequestMapping(value = "/admin/societySecurity")
public class SocietySecurityController {

    @Autowired
    private ISocietySecurityService societySecurityService;

    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/societySecurity/index");
        return modelAndView;
    }

    /*
     *@Description 万人刑事犯罪率
     *@Param
     *@Date 2018/8/7
     *@return
     **/
    @RequestMapping(value = "criminalrate.action")
    @ResponseBody
    public ResultState getCriminalRate(){
        return societySecurityService.getCriminalRate();
    }

    /*
     *@Description 区域立案数占比
     *@Param
     *@Date 2018/8/7
     *@return
     **/
    @RequestMapping(value = "registerlegalpro.action")
    @ResponseBody
    public ResultState getRegisterLegalPro(){
        return societySecurityService.getRegisterLegalPro();
    }

    /*
    *@Description  万人犯罪率趋势
    *@Param
    *@Date 2018/8/9
    *@return
    **/
    @RequestMapping(value = "registerlegalten.action")
    @ResponseBody
    public ResultState getRegisterLegalTen(){
        return societySecurityService.getRegisterLegalTen();
    }

    /*
    *@Description  刑事案件立案率
    *@Param
    *@Date 2018/8/9
    *@return
    **/
    @RequestMapping(value = "criregpro.action")
    @ResponseBody
    public ResultState getCriRegPro(){
        return societySecurityService.getCriRegPro();
    }

    /*
    *@Description   重点部位安全监控覆盖率
    *@Param
    *@Date 2018/8/10
    *@return
    **/
    @RequestMapping(value = "importantareamonitor.action")
    @ResponseBody
    public ResultState getImportantAreaMonitor(){
        return societySecurityService.getImportantAreaMonitor();
    }

    /*
    *@Description   警员配置数
    *@Param
    *@Date 2018/8/10
    *@return
    **/
    @RequestMapping(value = "policepro.action")
    @ResponseBody
    public ResultState getPolicepro(){
        return societySecurityService.getPolicepro();
    }

}
