package com.ruoyi.web.controller.app;

import com.ruoyi.app.domain.Monitor;
import com.ruoyi.app.domain.NFIDReader;
import com.ruoyi.app.service.INFIDReaderService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysConfigService;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
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;

@RestController
@RequestMapping("/app/NFIDReader")
public class NFIDReaderController extends BaseController {
    @Autowired
    private INFIDReaderService NFIDReaderService;

    public static final Logger log = LoggerFactory.getLogger(ExcelUtil.class);
    /**
     * 查询NFID识别器设备列表
     */
    @ApiOperation("查询NFID识别器设备列表")
    @PreAuthorize("@ss.hasPermi('app:NFIDReader:list')")
    @GetMapping("/list")
    public TableDataInfo list(NFIDReader NFIDReader)
    {
        startPage();
        List<NFIDReader> list = NFIDReaderService.selectNFIDReaderList(NFIDReader);
        return getDataTable(list);
    }

    /**
     * 查询全部NFID识别器设备列表
     */
    @ApiOperation("查询全部NFID识别器设备列表")
    @PreAuthorize("@ss.hasPermi('app:NFIDReader:list')")
    @GetMapping("/optionselect")
    public AjaxResult optionselect(NFIDReader NFIDReader)
    {
        List<NFIDReader> list = NFIDReaderService.selectNFIDReaderList(NFIDReader);
        return success(list);
    }
}