import request from '@/utils/request'

// 下载资产导入模板
export function importAssetTemplate() {
  return request({
    url: '/ccdi/assetInfo/importTemplate',
    method: 'post'
  })
}

// 导入资产数据
export function importAssetData(data) {
  return request({
    url: '/ccdi/assetInfo/importData',
    method: 'post',
    data: data
  })
}

// 查询资产导入状态
export function getAssetImportStatus(taskId) {
  return request({
    url: '/ccdi/assetInfo/importStatus/' + taskId,
    method: 'get'
  })
}

// 查询资产导入失败记录
export function getAssetImportFailures(taskId, pageNum, pageSize) {
  return request({
    url: '/ccdi/assetInfo/importFailures/' + taskId,
    method: 'get',
    params: { pageNum, pageSize }
  })
}
