package com.huashe.park.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.huashe.park.domain.entity.PileHoleIndexRealtime;

/**
 * 桩点最新指标Mapper接口
 * 
 * @author ruoyi
 * @date 2025-02-28
 */
public interface PileHoleIndexRealtimeMapper {
    /**
     * 查询桩点最新指标
     * 
     * @param id 桩点最新指标主键
     * @return 桩点最新指标
     */
    public PileHoleIndexRealtime selectPileHoleIndexRealtimeById(Long id);

    /**
     * 查询桩点最新指标列表
     * 
     * @param pileHoleIndexRealtime 桩点最新指标
     * @return 桩点最新指标集合
     */
    public List<PileHoleIndexRealtime> selectPileHoleIndexRealtimeList(PileHoleIndexRealtime pileHoleIndexRealtime);

    /**
     * 新增桩点最新指标
     * 
     * @param pileHoleIndexRealtime 桩点最新指标
     * @return 结果
     */
    public int insertPileHoleIndexRealtime(PileHoleIndexRealtime pileHoleIndexRealtime);

    /**
     * 修改桩点最新指标
     * 
     * @param pileHoleIndexRealtime 桩点最新指标
     * @return 结果
     */
    public int updatePileHoleIndexRealtime(PileHoleIndexRealtime pileHoleIndexRealtime);

    public int updatePileHoleIndexRealtimeByHoleIdAndMachineId(PileHoleIndexRealtime pileHoleIndexRealtime);

    /**
     * 删除桩点最新指标
     * 
     * @param id 桩点最新指标主键
     * @return 结果
     */
    public int deletePileHoleIndexRealtimeById(Long id);

    /**
     * 批量删除桩点最新指标
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePileHoleIndexRealtimeByIds(Long[] ids);

    public int selectMachineConstingPileHole(@Param("machineId") Long machineId, @Param("startTime") String startTime);

    PileHoleIndexRealtime selectMachineLatestIndex(Long machineId);
}
