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

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.common.pojo.CommonResult;
import com.unis.visualization.modular.MonitorAI.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("视频AI分析预警 - 故障摄像头")
    @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("视频AI分析预警 - 使用占比")
    @GetMapping("/monitorAI/selectMonitorProportion")
    public CommonResult<Integer> selectMonitorProportion() {
        return CommonResult.data(monitorAIService.selectMonitorProportion());
    }

    /**
     * 仓内仓外数量统计-仓内仓外数量统计
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("视频AI分析预警 - 仓内仓外数量统计")
    @GetMapping("/monitorAI/selectMonitorInsideCount")
    public CommonResult<List<Map<String,Object>>> selectMonitorInsideCount() {
        return CommonResult.data(monitorAIService.selectMonitorInsideCount());
    }

    /**
     * 仓内仓外数量统计-仓内仓外数量统计
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("视频AI分析预警 - 各市州在线情况统计")
    @GetMapping("/monitorAI/selectCityMonitorCount")
    public CommonResult<List<Map<String,Object>>> selectCityMonitorCount() {
        return CommonResult.data(monitorAIService.selectCityMonitorCount());
    }

    /**
     * 视频AI分析预警-库区摄像头数量统计
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("视频AI分析预警 - 库区摄像头数量统计")
    @GetMapping("/monitorAI/selectKqMonitorCount")
    public CommonResult<List<Map<String,Object>>> selectKqMonitorCount() {
        return CommonResult.data(monitorAIService.selectKqMonitorCount());
    }

    /**
     * 视频AI分析预警-视频监控异常事件告警
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("视频AI分析预警 - 视频监控异常事件告警")
    @GetMapping("/monitorAI/selectException")
    public CommonResult<List<Map<String,Object>>> selectException() {
        return CommonResult.data(monitorAIService.selectException());
    }
    /**
     * 视频监控可视化 - 各市州预警统计
     *
     * @author ZeroLiYi
     * @date  2024/06/20 11:37
     */
    @ApiOperationSupport(order = 8)
    @ApiOperation("视频监控可视化 - 各市州预警统计")
    @GetMapping("/monitorAI/selectMonitorWarningCount")
    public CommonResult<List<Map<String,Object>>> selectMonitorWarningCount() {
        return CommonResult.data(monitorAIService.selectMonitorWarningCount());
    }

    /**
     * 视频监控可视化 - 设备在线率
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("视频监控可视化 - 设备在线率")
    @GetMapping("/monitorAI/selectMonitorOnlineRate")
    public CommonResult<Map<String,Object>> selectMonitorOnlineRate() {
        return CommonResult.data(monitorAIService.selectMonitorOnlineRate());
    }

    /**
     * 视频监控可视化 - 各市州预警统计
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 10)
    @ApiOperation("视频监控可视化 - 各市州摄像头统计")
    @GetMapping("/monitorAI/selectMonitorStatistics")
    public CommonResult<List<Map<String,Object>>> selectMonitorStatistics() {
        return CommonResult.data(monitorAIService.selectMonitorStatistics());
    }

    /**
     * 应急管理可视化 - 应急企业统计
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 应急企业统计")
    @GetMapping("/monitorAI/selectEmergencyBusinessStatistics")
    public CommonResult<List<Map<String,Object>>> selectEmergencyBusinessStatistics() {
        return CommonResult.data(monitorAIService.selectEmergencyBusinessStatistics());
    }

    /**
     * 应急管理可视化 -市州应急企业数量
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 市州应急企业数量")
    @GetMapping("/monitorAI/selectCityEmergencyBusinessStatistics")
    public CommonResult<List<Map<String,Object>>> selectCityEmergencyBusinessStatistics() {
        return CommonResult.data(monitorAIService.selectCityEmergencyBusinessStatistics());
    }

    /**
     * 应急管理可视化 -加工企业日加工量统计
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 加工企业日加工量统计")
    @GetMapping("/monitorAI/selectDPVSMETStatistics")
    public CommonResult<List<Map<String,Object>>> selectDPVSMETStatistics() {
        return CommonResult.data(monitorAIService.selectDPVSMETStatistics());
    }

    /**
     * 应急管理可视化 -各市州网点日供应能力
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 各市州网点日供应能力")
    @GetMapping("/monitorAI/selectCityDailySupplyCapacity")
    public CommonResult<List<Map<String,Object>>> selectCityDailySupplyCapacity() {
        return CommonResult.data(monitorAIService.selectCityDailySupplyCapacity());
    }

    /**
     * 应急管理可视化 -仓储企业日库存能力
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 仓储企业日库存能力")
    @GetMapping("/monitorAI/selectDailyInventoryCapacity")
    public CommonResult<List<Map<String,Object>>> selectDailyInventoryCapacity() {
        return CommonResult.data(monitorAIService.selectDailyInventoryCapacity());
    }

    /**
     * 应急管理可视化 -配送企业能力统计
     *
     * @author ZeroLiYi
     * @date  2024/06/26 11:37
     */
    @ApiOperationSupport(order = 11)
    @ApiOperation("应急管理可视化 - 配送企业能力统计")
    @GetMapping("/monitorAI/selectDeliveryCapability")
    public CommonResult<List<Map<String,Object>>> selectDeliveryCapability() {
        return CommonResult.data(monitorAIService.selectDeliveryCapability());
    }




}
