package com.unis.visualization.modular.grainOilReserve.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.common.pojo.CommonResult;
import com.unis.reserveLayout.modular.dataSystemInfo.param.DataPageParam;
import com.unis.visualization.modular.grainOilReserve.service.MonitorAIService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 可视化-粮油储备控制器
 *
 * @author TS
 * @date  2024/06/18 11:08
 */
@Api(tags = "可视化-摄像头视频监控")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
public class MonitorAIController {

    @Resource
    private MonitorAIService monitorAIService;


    /**
     * 视频AI分析预警-摄像头总数
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("监控在线情况统计 - 摄像头总数")
    @GetMapping("/monitorAI/selectMonitorCount")
    public CommonResult<Integer> selectMonitorCount() {
        return CommonResult.data(monitorAIService.selectMonitorCount());
    }

    /**
     * 视频AI分析预警-故障摄像头
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("监控在线情况统计 - 故障摄像头")
    @GetMapping("/monitorAI/selectFaultMonitorCount")
    public CommonResult<Integer> selectFaultMonitorCount() {
        return CommonResult.data(monitorAIService.selectFaultMonitorCount());
    }
    /**
     * 视频AI分析预警-使用占比
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("监控在线情况统计 - 使用占比")
    @GetMapping("/monitorAI/selectMonitorProportion")
    public CommonResult<Integer> selectMonitorProportion() {
        return CommonResult.data(monitorAIService.selectMonitorProportion());
    }


}
