package com.dcsoft.system.mapper;

import java.util.List;
import java.util.Map;

import com.dcsoft.system.domain.SysEmpowerRecord;
import com.dcsoft.system.domain.SysEquipment;
import com.dcsoft.system.domain.SysPeople;
import com.dcsoft.system.domain.vo.SysFileVo;

/**
 * 设备信息Mapper接口
 *
 * @author nichun
 * @date 2023-03-08
 */
public interface SysEquipmentMapper
{
    /**
     * 查询设备信息
     *
     * @param id 设备信息主键
     * @return 设备信息
     */
    public SysEquipment selectSysEquipmentById(Long id);

    /**
     * 查询设备信息列表
     *
     * @param sysEquipment 设备信息
     * @return 设备信息集合
     */
    public List<SysEquipment> selectSysEquipmentList(SysEquipment sysEquipment);

    /**
     * 新增设备信息
     *
     * @param sysEquipment 设备信息
     * @return 结果
     */
    public int insertSysEquipment(SysEquipment sysEquipment);

    /**
     * 修改设备信息
     *
     * @param sysEquipment 设备信息
     * @return 结果
     */
    public int updateSysEquipment(SysEquipment sysEquipment);

    /**
     * 删除设备信息
     *
     * @param id 设备信息主键
     * @return 结果
     */
    public int deleteSysEquipmentById(Long id);

    /**
     * 批量删除设备信息
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysEquipmentByIds(Long[] ids);

    SysEquipment selectEquipmentBySequence(String deviceNo);

    /**
     * 查询设备信息
     */
    List<SysEquipment> queryEquipmentInfo(List<String> pointIds);

    /**
     * 查询人员信息
     */
    SysPeople queryPeopleInfo(SysPeople people);

    List<Map<String, Object>> selectSysEquipmentPeopleById(Long id);

    /**
     * 根据设备序列号查询产品类型
     * @param deviceKey
     * @return
     */
    String queryDeviceSequence(String deviceKey);

    /**
     * 查询授权记录规则id
     * @param people
     * @return
     */
    List<SysEmpowerRecord> queryEmpowerRecord(SysPeople people);

    /**
     * 查询人员信息
     * @param sysPeople
     * @return
     */
    SysPeople queryPeople(SysPeople sysPeople);

    SysEquipment queryEmpower(String sequence);

    /**
     * 根据设备序列好查询设备信息
     * @param sysEquipment
     * @return
     */
    SysEquipment queryEquipmentByDeviceKey(SysEquipment sysEquipment);

    List<SysEquipment> queryEquipmentByIp(List<String> listIp);

    /**
     * 根据设备序列号修改设备密码
     * @param sysEquipment
     */
    void updateEquipmentByDeviceKey(SysEquipment sysEquipment);

    void saveFile(List<SysFileVo> sysFiles);

    void deleteFile(SysFileVo sysFile);

    List<SysFileVo> queryFile(SysFileVo sysFile);
}
