import request from '@/utils/request'

// 查询维修点列表
export function listRepairpoints(query) {
  return request({
    url: '/check/repairpoints/list',
    method: 'get',
    params: query
  })
}

// 查询维修点列表
export function byInspectionId(inspectionId) {
  return request({
    url: '/check/repairpoints/byInspectionId/'+inspectionId,
    method: 'get',
  })
}

// 查询维修点详细
export function getRepairpoints(checkId) {
  return request({
    url: '/check/repairpoints/' + checkId,
    method: 'get'
  })
}

// 新增维修点
export function addRepairpoints(data) {
  return request({
    url: '/check/repairpoints',
    method: 'post',
    data: data
  })
}

// 修改维修点
export function updateRepairpoints(data) {
  return request({
    url: '/check/repairpoints',
    method: 'put',
    data: data
  })
}

// 删除维修点
export function delRepairpoints(checkId) {
  return request({
    url: '/check/repairpoints/' + checkId,
    method: 'delete'
  })
}

//送审审核
export function approveRepairpoints(data) {
  return request({
    url: '/check/repairpoints/toApprove',
    method: 'put',
    data: data
  })
}
