import request from '@/utils/request'

// 查询特种设备叉车台账列表
export function listSpecCc(query) {
  return request({
    url: '/sems/specCc/list',
    method: 'get',
    params: query
  })
}

// 查询特种设备叉车台账详细
export function getSpecCc(id) {
  return request({
    url: '/sems/specCc/' + id,
    method: 'get'
  })
}

/**
 * 查询特种设备叉车的改造记录
 */
export function getSpecCcByReform(devId) {
  return request({
    url: '/his/cc/reform/' + devId,
    method: 'get'
  })
}

// 新增特种设备叉车台账
export function addSpecCc(data) {
  return request({
    url: '/sems/specCc',
    method: 'post',
    data: data
  })
}

// 修改特种设备叉车台账
export function updateSpecCc(data) {
  return request({
    url: '/sems/specCc',
    method: 'put',
    data: data
  })
}

// 修改特种设备叉车台账
export function updateSpecCcPre(data) {
  return request({
    url: '/his/cc',
    method: 'post',
    data: data
  })
}

// 删除特种设备叉车台账
export function delSpecCc(id) {
  return request({
    url: '/sems/specCc/' + id,
    method: 'delete'
  })
}

// 导出特种设备叉车台账
export function exportSpecCc(query) {
  return request({
    url: '/sems/specCc/export',
    method: 'get',
    params: query
  })
}

// 导出特种设备叉车台账
export function exportSpecList(query) {
  return request({
    url: '/sems/specCc/exportDevList',
    method: 'get',
    params: query
  })
}

// 去重
export function duplicate(query) {
  return request({
    url: '/sems/specCc/duplicate',
    method: 'get',
    params: query
  })
}
