package com.fuyuanshen.web.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyuanshen.app.domain.AppPersonnelInfoRecords;
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
import com.fuyuanshen.equipment.domain.Device;
import com.fuyuanshen.equipment.domain.DeviceLog;
import com.fuyuanshen.equipment.domain.dto.AppDeviceBo;
import com.fuyuanshen.equipment.domain.form.DeviceForm;
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
import com.fuyuanshen.equipment.domain.vo.CustomerVo;
import com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo;
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;

import java.io.IOException;
import java.util.List;

/**
 * @Description:
 * @Author: WY
 * @Date: 2025/5/16
 **/
public interface WEBDeviceService extends IService<Device> {

    /**
     * WEB端解绑设备
     *
     * @param id
     * @return
     */
    int webUnBindDevice(Long id, Long userId);

    /**
     * WEB端设备详情
     *
     * @param id
     * @return
     */
    WebDeviceVo getDevice(Long id);

    /**
     * 设备用户详情
     *
     * @param id
     * @return
     */
    List<AppPersonnelInfoRecords> getDeviceUser(Long id);

    /**
     * 设备操作记录
     *
     * @param deviceId
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return
     */
    TableDataInfo<DeviceLog> getOperationRecord(Long deviceId, String startTime, String endTime, PageQuery pageQuery);


    /**
     * 设备告警记录
     *
     * @param deviceId
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return
     */
    TableDataInfo<DeviceAlarmVo> getAlarmRecord(Long deviceId, String startTime, String endTime, PageQuery pageQuery);

}
