package com.zd.laboratory.controller;

import com.zd.common.core.domain.per.PerFun;
import com.zd.common.core.domain.per.PerPrefix;
import com.zd.common.core.web.controller.BaseController;
import com.zd.common.core.web.page.TableDataInfo;
import com.zd.common.security.annotation.PreAuthorize;
import com.zd.laboratory.domain.AlarmLog;
import com.zd.laboratory.service.IAlarmLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 电话报警日志
 */
@Api(tags = {"电话报警日志"})
@RestController
@RequestMapping("/alarmLog")
public class AlarmController extends BaseController {

    @Autowired
    private IAlarmLogService alarmLogService;

    /**
     * 查询算法结果列表
     */
    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_ALARM + PerFun.LIST)
    @ApiOperation("查询列表")
    @GetMapping("/list")
    public TableDataInfo<AlarmLog> list(AlarmLog alarmLog) {
        startPage();
        List<AlarmLog> list = alarmLogService.selectAlarmLogList(alarmLog);
        return getDataTable(list);
    }
}
