package com.aucma.dms.mapper;

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

import java.util.List;

/**
 * 点巡检工单明细Mapper接口
 *
 * @author xins
 * @date 2024-03-19
 */
public interface DmsInspectInstanceDetailMapper
{
    /**
     * 查询点巡检工单明细
     *
     * @param instanceDetailId 点巡检工单明细主键
     * @return 点巡检工单明细
     */
    public DmsInspectInstanceDetail selectDmsInspectInstanceDetailByInstanceDetailId(Long instanceDetailId);

    /**
     * 查询点巡检工单明细列表
     *
     * @param dmsInspectInstanceDetail 点巡检工单明细
     * @return 点巡检工单明细集合
     */
    public List<DmsInspectInstanceDetail> selectDmsInspectInstanceDetailList(DmsInspectInstanceDetail dmsInspectInstanceDetail);

    /**
     * 新增点巡检工单明细
     *
     * @param dmsInspectInstanceDetail 点巡检工单明细
     * @return 结果
     */
    public int insertDmsInspectInstanceDetail(DmsInspectInstanceDetail dmsInspectInstanceDetail);

    /**
     * 修改点巡检工单明细
     *
     * @param dmsInspectInstanceDetail 点巡检工单明细
     * @return 结果
     */
    public int updateDmsInspectInstanceDetail(DmsInspectInstanceDetail dmsInspectInstanceDetail);

    /**
     * 删除点巡检工单明细
     *
     * @param instanceDetailId 点巡检工单明细主键
     * @return 结果
     */
    public int deleteDmsInspectInstanceDetailByInstanceDetailId(Long instanceDetailId);

    /**
     * 批量删除点巡检工单明细
     *
     * @param instanceDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDmsInspectInstanceDetailByInstanceDetailIds(Long[] instanceDetailIds);




    /**
     * 查询点巡检工单明细列表,Join设备
     *
     * @param dmsInspectInstanceDetail 点巡检工单明细
     * @return 点巡检工单明细集合
     */
    public List<DmsInspectInstanceDetail> selectDmsInspectInstanceDetailJoinList(DmsInspectInstanceDetail dmsInspectInstanceDetail);

    /**
     * 根据唯一索引（inspectInstanceId和deviceCode）查询点巡检工单明细
     * @param inspectInstanceId
     * @param deviceCode
     * @return
     */
    public DmsInspectInstanceDetail selectDmsInspectInstanceDetailByUI(@Param("inspectInstanceId") Long inspectInstanceId,
                                                                       @Param("deviceCode") String deviceCode);

    Long selectProjectId(String inspectStandard);
}
