package com.dcs.dcs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dcs.dcs.domain.DcsEquipment;
import com.dcs.dcs.domain.vo.DcsEquipmentFormVo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 设备管理Mapper接口
 * 
 * @author hmy
 * @date 2025-03-08
 */
@Repository
public interface DcsEquipmentMapper extends BaseMapper<DcsEquipment>
{
    /**
     * 查询设备管理
     * 
     * @param equipmentId 设备管理主键
     * @return 设备管理
     */
    public DcsEquipment selectDcsEquipmentByEquipmentId(Long equipmentId);

    /**
     * 查询设备管理列表
     * 
     * @param dcsEquipment 设备管理
     * @return 设备管理集合
     */
    public List<DcsEquipment> selectDcsEquipmentList(DcsEquipment dcsEquipment);

    public List<DcsEquipmentFormVo> selectDcsEquipmentVoList(DcsEquipment dcsEquipment);

    /**
     * 新增设备管理
     * 
     * @param dcsEquipment 设备管理
     * @return 结果
     */
    public int insertDcsEquipment(DcsEquipment dcsEquipment);

    /**
     * 修改设备管理
     * 
     * @param dcsEquipment 设备管理
     * @return 结果
     */
    public int updateDcsEquipment(DcsEquipment dcsEquipment);

    /**
     * 删除设备管理
     * 
     * @param equipmentId 设备管理主键
     * @return 结果
     */
    public int deleteDcsEquipmentByEquipmentId(Long equipmentId);

    /**
     * 批量删除设备管理
     * 
     * @param equipmentIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDcsEquipmentByEquipmentIds(Long[] equipmentIds);


    List<Integer> getEquipmentIndexList();

    /**
     * 根据设备编码查询设备信息
     * @param equipmentCode
     * @return
     */
    DcsEquipment selectOneByEquipmentCode(String equipmentCode);

    /**
     * 根据数据类型查询设备信息
     * @param dataTypes
     * @return
     */
    List<DcsEquipment> selectDcsEquipmentListByDataTypes(List<String> dataTypes);
}
