import request from '@/utils/request'

// 查询故障项目列表
export function listMalfunctionProject(query) {
  return request({
    url: '/business/malfunctionProject/list',
    method: 'get',
    params: query
  })
}

// 查询故障项目详细
export function getMalfunctionProject(id) {
  return request({
    url: '/business/malfunctionProject/' + id,
    method: 'get'
  })
}

// 新增故障项目
export function addMalfunctionProject(data) {
  return request({
    url: '/business/malfunctionProject',
    method: 'post',
    data: data
  })
}

// 修改故障项目
export function updateMalfunctionProject(data) {
  return request({
    url: '/business/malfunctionProject',
    method: 'put',
    data: data
  })
}

// 删除故障项目
export function delMalfunctionProject(id) {
  return request({
    url: '/business/malfunctionProject/' + id,
    method: 'delete'
  })
}

// 查询故障项目详细
export function getMalfunctionCode() {
  return request({
    url: '/business/malfunctionProject/getMalfunctionCode',
    method: 'get'
  })
}