import request from '@/utils/request'

// 查询特种设备压力容器台账列表
export function listSpecYlrq(query) {
  return request({
    url: '/sems/specYlrq/list',
    method: 'get',
    params: query
  })
}

// 查询特种设备压力容器台账详细
export function getSpecYlrq(id) {
  return request({
    url: '/sems/specYlrq/' + id,
    method: 'get'
  })
}

/**
 * 查询特种设备压力容器的改造记录
 */
export function getSpecYlrqByReform(devId) {
  return request({
    url: '/his/ylrq/reform/' + devId,
    method: 'get'
  })
}

// 新增特种设备压力容器台账
export function addSpecYlrq(data) {
  return request({
    url: '/sems/specYlrq',
    method: 'post',
    data: data
  })
}

// 修改特种设备压力容器台账
export function updateSpecYlrq(data) {
  return request({
    url: '/sems/specYlrq',
    method: 'put',
    data: data
  })
}

// 修改特种设备压力容器台账(申请)
export function updateSpecYlrqPre(data) {
  return request({
    url: '/his/ylrq',
    method: 'post',
    data: data
  })
}

// 删除特种设备压力容器台账
export function delSpecYlrq(id) {
  return request({
    url: '/sems/specYlrq/' + id,
    method: 'delete'
  })
}

// 导出特种设备压力容器台账
export function exportSpecYlrq(query) {
  return request({
    url: '/sems/specYlrq/export',
    method: 'get',
    params: query
  })
}
