import request from '@/utils/request'

// 查询维修与故障关联列表
export function listMaintainMalfunction(query) {
  return request({
    url: '/business/maintainMalfunction/list',
    method: 'get',
    params: query
  })
}

// 查询维修与故障关联详细
export function getMaintainMalfunction(malfunctionId) {
  return request({
    url: '/business/maintainMalfunction/' + malfunctionId,
    method: 'get'
  })
}

// 新增维修与故障关联
export function addMaintainMalfunction(data) {
  return request({
    url: '/business/maintainMalfunction',
    method: 'post',
    data: data
  })
}

// 修改维修与故障关联
export function updateMaintainMalfunction(data) {
  return request({
    url: '/business/maintainMalfunction',
    method: 'put',
    data: data
  })
}

// 删除维修与故障关联
export function delMaintainMalfunction(malfunctionId) {
  return request({
    url: '/business/maintainMalfunction/' + malfunctionId,
    method: 'delete'
  })
}
