package com.bonus.bracelet.controller;

import com.bonus.bracelet.service.IDeviceLyRecordService;
import com.bonus.bracelet.service.IWarnHistoryService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
import com.bonus.common.entity.bracelet.vo.WarnInfoVo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

/**
 * @className:WarnHistoryController
 * @description:预警历史记录-web层
 */
@RestController
@RequestMapping("/warnHistory/")
@Slf4j
public class WarnHistoryController extends BaseController {

    @Resource(name = "IWarnHistoryService")
    private IWarnHistoryService service;

    @GetMapping("listWarn")
    @SysLog(title = "综合查询", businessType = OperaType.QUERY,module = "综合查询->预警历史记录",details ="查询预警历史列表")
    public TableDataInfo listWarn(WarnInfoVo dto) {
        startPage();
        List<WarnInfoVo> list = service.getWarnLists(dto);
        return getDataTable(list);
    }

}
