package com.ktg.iscs.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktg.common.mapper.BaseMapperX;
import com.ktg.iscs.domain.IsIsolationPoint;
import com.ktg.iscs.domain.dto.point.PagePointDTO;
import com.ktg.iscs.domain.vo.points.PointDetailVO;
import com.ktg.iscs.domain.vo.points.PointPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 隔离点Mapper接口
 *
 * @author cgj
 * @date 2024-10-18
 */
@Mapper
public interface IsIsolationPointMapper extends BaseMapperX<IsIsolationPoint>
{
    /**
     * 查询隔离点
     *
     * @param pointId 隔离点主键
     * @return 隔离点
     */
    PointDetailVO selectIsIsolationPointByPointId(Long pointId);

    /**
     * 查询隔离点列表
     *
     * @param isIsolationPoint 隔离点
     * @return 隔离点集合
     */
    List<IsIsolationPoint> selectIsIsolationPointList(IsIsolationPoint isIsolationPoint);

    /**
     * 新增隔离点
     *
     * @param isIsolationPoint 隔离点
     * @return 结果
     */
    int insertIsIsolationPoint(IsIsolationPoint isIsolationPoint);

    /**
     * 修改隔离点
     *
     * @param isIsolationPoint 隔离点
     * @return 结果
     */
    int updateIsIsolationPoint(IsIsolationPoint isIsolationPoint);

    /**
     * 删除隔离点
     *
     * @param pointId 隔离点主键
     * @return 结果
     */
    int deleteIsIsolationPointByPointId(Long pointId);

    /**
     * 批量删除隔离点
     *
     * @param pointIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteIsIsolationPointByPointIds(Long[] pointIds);

    List<PointDetailVO> getPointDetailList(@Param(value = "pointIds") List<Long> pointIds);

    Page<PointPageVO> getIsIsolationPointPage(Page<IsIsolationPoint> page, @Param(value = "dto") PagePointDTO dto);

    IsIsolationPoint getOneByNfc(@Param(value = "nfc") String nfc);

    List<IsIsolationPoint> getIsIsolationPointList(@Param(value = "workshopId") Long workshopId, @Param(value = "workareaId") Long workareaId);

}
