import request from '@/utils/request'

// 查询特种设备电梯台账列表
export function listSpecDt(query) {
  return request({
    url: '/sems/specDt/list',
    method: 'get',
    params: query
  })
}

// 查询特种设备电梯台账详细
export function getSpecDt(id) {
  return request({
    url: '/sems/specDt/' + id,
    method: 'get'
  })
}

/**
 * 查询特种设备电梯的改造记录
 */
export function getSpecDtByReform(devId) {
  return request({
    url: '/his/dt/reform/' + devId,
    method: 'get'
  })
}

// 新增特种设备电梯台账
export function addSpecDt(data) {
  return request({
    url: '/sems/specDt',
    method: 'post',
    data: data
  })
}

// 修改特种设备电梯台账
export function updateSpecDt(data) {
  return request({
    url: '/sems/specDt',
    method: 'put',
    data: data
  })
}

// 修改特种设备电梯台账
export function updateSpecDtPre(data) {
  return request({
    url: '/his/dt',
    method: 'post',
    data: data
  })
}

// 删除特种设备电梯台账
export function delSpecDt(id) {
  return request({
    url: '/sems/specDt/' + id,
    method: 'delete'
  })
}

// 导出特种设备电梯台账
export function exportSpecDt(query) {
  return request({
    url: '/sems/specDt/export',
    method: 'get',
    params: query
  })
}
