package com.aucma.dms.mapper;

import com.aucma.dms.domain.DmsInspectRouteDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 巡检线路明细Mapper接口
 *
 * @author Open Platform
 * @date 2024-01-16
 */
public interface DmsInspectRouteDetailMapper
{
    /**
     * 查询巡检线路明细
     *
     * @param routeDetailId 巡检线路明细主键
     * @return 巡检线路明细
     */
    public DmsInspectRouteDetail selectDmsInspectRouteDetailByRouteDetailId(@Param("routeDetailId") Long routeDetailId);

    /**
     * 查询巡检线路明细列表
     *
     * @param dmsInspectRouteDetail 巡检线路明细
     * @return 巡检线路明细集合
     */
    public List<DmsInspectRouteDetail> selectDmsInspectRouteDetailList(DmsInspectRouteDetail dmsInspectRouteDetail);

    /**
     * 新增巡检线路明细
     *
     * @param dmsInspectRouteDetail 巡检线路明细
     * @return 结果
     */
    public int insertDmsInspectRouteDetail(DmsInspectRouteDetail dmsInspectRouteDetail);

    /**
     * 修改巡检线路明细
     *
     * @param dmsInspectRouteDetail 巡检线路明细
     * @return 结果
     */
    public int updateDmsInspectRouteDetail(DmsInspectRouteDetail dmsInspectRouteDetail);

    /**
     * 删除巡检线路明细
     *
     * @param routeDetailId 巡检线路明细主键
     * @return 结果
     */
    public int deleteDmsInspectRouteDetailByRouteDetailId(@Param("routeDetailId") Long routeDetailId);

    /**
     * 批量删除巡检线路明细
     *
     * @param routeDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDmsInspectRouteDetailByRouteDetailIds(@Param("routeDetailIds") Long[] routeDetailIds);

    List<DmsInspectRouteDetail> selectInspectRouteListByInspectRouteId(@Param("inspectRouteId") Long inspectRouteId);

    /**
     * 查询巡检路线下的所有设备ID列表
     * @param inspectRouteId 巡检路线ID
     * @return 设备ID列表（machine_id）
     */
    List<Long> selectDeviceIdsByRouteId(@Param("inspectRouteId") Long inspectRouteId);

}
