import request from '@/utils/request'

// 查询地块经营列表
export function listOperation(query) {
  return request({
    url: '/resource/operation/list',
    method: 'get',
    params: query
  })
}

// 查询地块经营详细
export function getOperation(id) {
  return request({
    url: '/resource/operation/' + id,
    method: 'get'
  })
}

// 查询地块经营详细
export function getOperationDetail(id) {
  return request({
    url: '/resource/operation/detail/' + id,
    method: 'get'
  })
}

// 查询地块经营详细
export function getOperationDetailByDkbm(dkbm) {
  return request({
    url: '/resource/operation/detailByDkbm/' + dkbm,
    method: 'get'
  })
}


// 新增地块经营
export function addOperation(data) {
  return request({
    url: '/resource/operation/add',
    method: 'post',
    data: data
  })
}

// 修改地块经营
export function updateOperation(data) {
  return request({
    url: '/resource/operation/update',
    method: 'post',
    data: data
  })
}

// 删除地块经营
export function delOperation(id) {
  return request({
    url: '/resource/operation/delete/' + id,
    method: 'get'
  })
}

// 打印地块经营
export function printOperation(query) {
  return request({
    url: '/resource/operation/print',
    method: 'get',
    params: query
  })
}
