import request from '@/utils/request'

// 查询抄记录列表
export function listRecord(query) {
  return request({
    url: '/system/record/list',
    method: 'get',
    params: query
  })
}

// 查询抄记录详细
export function getRecord(recordId) {
  return request({
    url: '/system/record/' + recordId,
    method: 'get'
  })
}

// 新增抄记录
export function addRecord(data) {
  return request({
    url: '/system/record',
    method: 'post',
    data: data
  })
}

// 修改抄记录
export function updateRecord(data) {
  return request({
    url: '/system/record',
    method: 'put',
    data: data
  })
}

// 删除抄记录
export function delRecord(recordId) {
  return request({
    url: '/system/record/' + recordId,
    method: 'delete'
  })
}

// 查询最后一条抄记录列表
export function listLatestRecord(query) {
  return request({
    url: '/system/record/latest',
    method: 'get',
    params: query
  })
}


// 查询统计
export function listCountRecord(query) {
  return request({
    url: '/system/record/count',
    method: 'get',
    params: query
  })
}
