import request from '@/utils/request'
// 查询资源性资产列表
export function listResource (query) {
  return request({
    url: '/api/asset/resource/list',
    method: 'get',
    params: query
  })
}

// 查询资源性资产台账列表
export function listResourceTz (query) {
  return request({
    url: '/api/asset/resource/listtz',
    method: 'get',
    params: query
  })
}
// 查询资源性资产详细
export function getResource (id) {
  return request({
    url: '/api/asset/resource/get/' + id,
    method: 'get'
  })
}

// 新增资源性资产
export function addResource (data) {
  return request({
    url: '/api/asset/resource/add',
    method: 'post',
    data: data
  })
}

// 修改资源性资产
export function updateResource (data) {
  return request({
    url: '/api/asset/resource/edit',
    method: 'post',
    data: data
  })
}

// 删除资源性资产
export function delResource (id) {
  return request({
    url: '/api/asset/resource/remove/' + id,
    method: 'get'
  })
}
// 导出数据项
export function exportResource (query) {
  return request({
    url: '/api/asset/resource/exporttz',
    method: 'get',
    params: query
  })
}

// 导出农用地数据项
export function exportResource1 (query) {
  return request({
    url: '/api/asset/resource/export1',
    method: 'get',
    params: query
  })
}

// 导出建设用地数据项
export function exportResource2 (query) {
  return request({
    url: '/api/asset/resource/export2',
    method: 'get',
    params: query
  })
}

// 导出未利用地、林地数据项
export function exportResource3 (query) {
  return request({
    url: '/api/asset/resource/export3',
    method: 'get',
    params: query
  })
}

// 查询当前账套空间数据
export function getResourceList (id) {
  return request({
    url: '/api/asset/resource/getResourceList/' + id,
    method: 'get'
  })
}

// 根据deptId查询资源列表
export function getResourceListByDeptId (deptId) {
  return request({
    url: '/api/asset/resource/getResourceListByDeptId/' + deptId,
    method: 'get',
  })
}

// 根据deptId查询资源列表
export function getResourceListNew (query) {
  return request({
    url: '/api/asset/resource/list',
    method: 'get',
    params: query
  })
}

// 清空空间字段
export function clearTheGeom (id) {
  return request({
    url: '/api/asset/resource/clear/' + id,
    method: 'get',
  })
}

// 资源汇总
export function sortSummary (params) {
  return request({
    url: '/api/asset/resource/sortSummary',
    method: 'get',
    params: params
  });
}

// 导出资源汇总
export function exportSortSummary (params) {
  return request({
    url: '/api/asset/resource/exportSortSummary',
    method: 'get',
    params: params
  });
}

// 查询固定资产详细
export function attachmentQuery( params ) {
  return request({
    url: '/api/system/attachment/query',
    method: 'get',
    params: params,
  })
}
