package com.ruoyi.project.base.mapper;

import java.util.List;

import com.ruoyi.common.annotation.DataScopePlant;
import com.ruoyi.project.base.domain.TBaseDevice;
import com.ruoyi.project.base.domain.TBasePoint;

/**
 * 设备/管线Mapper接口
 *
 * @author ruoyi
 * @date 2022-11-15
 */
public interface TBaseDeviceMapper
{
    /**
     * 查询设备/管线
     *
     * @param id 设备/管线主键
     * @return 设备/管线
     */
    public TBaseDevice selectTBaseDeviceById(Long id);
    public TBaseDevice selectDeviceByPlantRegionAndDevice(TBaseDevice tBaseDevice);

    public TBaseDevice selectTBaseDeviceByCode(TBasePoint tBasePoint);

    /**
     * 查询设备/管线列表
     *
     * @param tBaseDevice 设备/管线
     * @return 设备/管线集合
     */
    @DataScopePlant(deptAlias = "d")
    public List<TBaseDevice> selectTBaseDeviceList(TBaseDevice tBaseDevice);
    public List<TBaseDevice> selectAllDeviceByRegionId(Long regionId);

    /**
     * 新增设备/管线
     *
     * @param tBaseDevice 设备/管线
     * @return 结果
     */
    public int insertTBaseDevice(TBaseDevice tBaseDevice);

    /**
     * 修改设备/管线
     *
     * @param tBaseDevice 设备/管线
     * @return 结果
     */
    public int updateTBaseDevice(TBaseDevice tBaseDevice);
    public int updateTBaseDeviceByDevIds(TBaseDevice tBaseDevice);

    /**
     * 删除设备/管线
     *
     * @param id 设备/管线主键
     * @return 结果
     */
    public int deleteTBaseDeviceById(Long id);

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