package org.jeecg.modules.regular.mapper;

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

import java.util.List;

/**
 * @Description: 检修规程详情
 * @Author: jeecg-boot
 * @Date:   2025-01-16
 * @Version: V1.0
 */
public interface RegularDetailMapper extends BaseMapper<RegularDetail> {

    // 根据工单id查询所有需要测量的项点
    @Select("select brd.* from bu_regular_detail brd where brd.regular_id = (select bwo.regular_id from bu_work_order bwo where bwo.id = #{workOrderId}) and brd.measure='1'")
    List<RegularDetail> queryInputDetailByOrder(@Param("workOrderId")String workOrderId);

}
