package com.ruoyi.web.controller.manage;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.manage.service.IWarnManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tjf
 * @Date: 2025/6/19 星期四 15:00
 * @Describe: 主页统计
 */
@RestController
@RequestMapping("/manage/index")
public class IndexController extends BaseController {
    @Autowired
    private IWarnManageService warnManageService;

    /**
     * 告警内容+部门统计
     */
    @GetMapping("/warnManageIndex")
    public AjaxResult warnManageIndex() {
        return  warnManageService.getWarnManageIndex();
    }


    /**
     * 年度告警统计
     */
    @GetMapping("/warnManageIndexYear/{year}")
    public AjaxResult warnManageIndexYear(@PathVariable String year) {
        return  warnManageService.warnManageIndexYear(year);
    }

}
