import request from '@/utils/request'

// 查询特种设备锅炉台账列表
export function listSpecGl(query) {
  return request({
    url: '/sems/specGl/list',
    method: 'get',
    params: query
  })
}

// 查询特种设备锅炉台账详细
export function getSpecGl(id) {
  return request({
    url: '/sems/specGl/' + id,
    method: 'get'
  })
}

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

// 新增特种设备锅炉台账
export function addSpecGl(data) {
  return request({
    url: '/sems/specGl',
    method: 'post',
    data: data
  })
}

// 修改特种设备锅炉台账
export function updateSpecGl(data) {
  return request({
    url: '/sems/specGl',
    method: 'put',
    data: data
  })
}

// 修改特种设备锅炉台账(申请)
export function updateSpecGlPre(data) {
  return request({
    url: '/his/gl',
    method: 'post',
    data: data
  });
}

// 删除特种设备锅炉台账
export function delSpecGl(id) {
  return request({
    url: '/sems/specGl/' + id,
    method: 'delete'
  })
}

// 导出特种设备锅炉台账
export function exportSpecGl(query) {
  return request({
    url: '/sems/specGl/export',
    method: 'get',
    params: query
  })
}
