package com.sky.ioc.controller.security;

import com.sky.ioc.entity.params.IocParam;
import com.sky.ioc.service.security.SecurityService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @Description
 * @Author LunCe
 * @Date 2023/3/7 15:30
 **/
@Api(tags = "智慧安防--安防联动")
@Slf4j
@RestController
@RequestMapping("/security_linkage")
public class LinkageController {

    @Autowired
    private SecurityService securityService;



    @ApiOperation("告警管理--核心指标")
    @PostMapping("/getLinkageCoreIndicators")
    public ReturnMsg getLinkageCoreIndicators(@RequestBody IocParam iocParam){
        return securityService.getLinkageCoreIndicators(iocParam);
    }


    @ApiOperation("告警管理--告警趋势")
    @PostMapping("/getAlarmTrend")
    public ReturnMsg getAlarmTrend(@RequestBody IocParam iocParam){
        return securityService.getAlarmTrend(iocParam);
    }


    @ApiOperation("告警管理--告警分类")
    @PostMapping("/getAlarmClassification")
    public ReturnMsg getAlarmClassification(@RequestBody IocParam iocParam){
        return securityService.getAlarmClassification(iocParam);
    }


    @ApiOperation("告警管理--设备在线趋势")
    @PostMapping("/getEquipmentOnline")
    public ReturnMsg getEquipmentOnline(@RequestBody IocParam iocParam){
        return securityService.getEquipmentOnline(iocParam);
    }



    @ApiOperation("告警管理--楼层告警分布")
    @PostMapping("/getFloorAlarmDistribution")
    public ReturnMsg getFloorAlarmDistribution(@RequestBody IocParam iocParam){
        return securityService.getFloorAlarmDistribution(iocParam);
    }




    @ApiOperation("告警库--告警列表信息")
    @PostMapping("/getGiveAlarmList")
    public ReturnMsg getGiveAlarmList(@RequestBody IocParam iocParam){
        return securityService.getGiveAlarmList(iocParam);
    }

}
