import request from '@/utils/request'

// 查询检修计划明细列表
export function listDmsRepairDetail(query) {
  return request({
    url: '/dms/dmsRepairDetail/list',
    method: 'get',
    params: query
  })
}

// 查询检修计划明细详细
export function getDmsRepairDetail(planRepairDetailId) {
  return request({
    url: '/dms/dmsRepairDetail/' + planRepairDetailId,
    method: 'get'
  })
}

// 新增检修计划明细
export function addDmsRepairDetail(data) {
  return request({
    url: '/dms/dmsRepairDetail',
    method: 'post',
    data: data
  })
}

// 修改检修计划明细
export function updateDmsRepairDetail(data) {
  return request({
    url: '/dms/dmsRepairDetail',
    method: 'put',
    data: data
  })
}

// 删除检修计划明细
export function delDmsRepairDetail(planRepairDetailId) {
  return request({
    url: '/dms/dmsRepairDetail/' + planRepairDetailId,
    method: 'delete'
  })
}
//根据计划id查询计划明细列表
export function selectPlanRepairDetailByPlanRepairId(planRepairId) {
  return request({
    url:`/dms/dmsRepairDetail/selectPlanRepairDetailByPlanRepairId/${planRepairId}`,
    method:'get'
  })
}

