package com.lutao.cloud.oil.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.lutao.cloud.common.core.util.MessageInfo;
import com.lutao.cloud.common.security.annotation.Inner;
import com.lutao.cloud.oil.service.IBusinessDynamicDataAlarmService;
import com.lutao.entity.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

@Api(value = "动态数据报警",tags = "动态数据报警")
@RestController
@RequestMapping("/dynamic-data-alarm")
public class DynamicDataAlarmController {

    @Resource
    private IBusinessDynamicDataAlarmService iBusinessDynamicDataAlarmService;


    @ApiOperation(value = "气象监测信息动态数据",notes = "气象监测信息动态数据")
    @ApiOperationSupport(order = 1)
    @PostMapping("/atmosphere-monitor-info")
    @Inner(value = false)
    public MessageInfo<List<AtmosphereMonitorInfo>> atmosphereMonitorInfo(){

        return iBusinessDynamicDataAlarmService.queryAtmosphereMonitorInfo();
    }

    @ApiOperation(value = "感知监测信息",notes = "感知监测信息")
    @ApiOperationSupport(order = 2)
    @PostMapping("/perception-monitor-info")
    @Inner(value = false)
    public MessageInfo<List<PerceptionMonitorInfo>> perceptionMonitorInfo(){

        return iBusinessDynamicDataAlarmService.queryPerceptionMonitorInfo();
    }

    @ApiOperation(value = "火灾感知监测信息",notes = "火灾感知监测信息")
    @ApiOperationSupport(order = 3)
    @PostMapping("/perception-monitor-fire-info")
    @Inner(value = false)
    public MessageInfo<List<PerceptionMonitorFireInfo>> perceptionMonitorFireInfo(){

        return iBusinessDynamicDataAlarmService.queryPerceptionMonitorFireInfo();
    }

    @ApiOperation(value = "可燃气体感知监测信息",notes = "可燃气体感知监测信息")
    @ApiOperationSupport(order = 4)
    @PostMapping("/perception-monitor-gas-info")
    @Inner(value = false)
    public MessageInfo<List<PerceptionMonitorGasInfo>> perceptionMonitorGasInfo(){

        return iBusinessDynamicDataAlarmService.queryPerceptionMonitorGasInfo();
    }

    @ApiOperation(value = "有毒有害气体感知监测信息",notes = "有毒有害气体感知监测信息")
    @ApiOperationSupport(order = 5)
    @PostMapping("/perception-monitor-hazardous-gas-info")
    @Inner(value = false)
    public MessageInfo<List<PerceptionMonitorHazardousGasInfo>> perceptionMonitorHazardousGasInfo(){

        return iBusinessDynamicDataAlarmService.queryPerceptionMonitorHazardousGasInfo();
    }
}
