package org.jeecg.modules.regular.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.regular.entity.RegularInput;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 检修测量数据
 * @Author: jeecg-boot
 * @Date:   2025-01-17
 * @Version: V1.0
 */
public interface RegularInputMapper extends BaseMapper<RegularInput> {

    @Select("select * from bu_regular_input bri where detail_id in (select id from bu_regular_detail brd where regular_id = #{regularId}) and tool_id =#{toolId}")
    List<RegularInput> queryInputByOrderAndTool(@Param("regularId")String regularId,@Param("toolId")String toolId);

    @Select("select id from bu_part where device=#{deviceId} and type=(select depard from bu_regular_detail where id=#{detailId})")
    String queryPartByDeviceAndInput(@Param("deviceId")String deviceId,@Param("detailId")String detailId);
}
