import request from '@/utils/request'

// 查询数据调查-农户户内成员列表
export function listNhhncy(query) {
  return request({
    url: '/home/homesteadnhhncy/list',
    method: 'get',
    params: query
  })
}

// 导出数据调查-农户户内成员
export function exportNhhncy(query) {
  return request({
    url: '/home/homesteadnhhncy/export',
    method: 'get',
    params: query
  })
}

// 查询数据调查-农户户内成员详细
export function getNhhncy(id) {
  return request({
    url: '/home/homesteadnhhncy/get/' + id,
    method: 'get'
  })
}
// 查询列表
export function queryHomesteadnhhncyList(query) {
  return request({
    url: '/home/homesteadnhhncy/queryList',
    method: 'get',
    params: query
  })
}


export function addOutsidenhhncy(data) {
  return request({
    url: '/home/homesteadnhhncy/outsideAdd',
    method: 'post',
    data: data
  })
}

// 新增数据调查-农户户内成员
export function addNhhncy(data) {
  return request({
    url: '/home/homesteadnhhncy/add',
    method: 'post',
    data: data
  })
}
// 过户
export function guohu(id, to, data) {
  return request({
    url: `/home/homesteadnhhncy/guohu/${id}/to/${to}`,
    method: 'post',
    data: data
  })
}

// 分户
export function fenhu(id, data) {
  return request({
    url: '/home/homesteadnhhncy/fenhu/' + id,
    method: 'post',
    data: data
  })
}

// 设为户主
export function toHuzhu(id, data) {
  return request({
    url: '/home/homesteadnhhncy/toHuzhu/' + id,
    method: 'post',
    data: data
  })
}
// 新增数据调查-户主信息
export function nhhncyConnectTask(data) {
  return request({
    url: '/home/homesteadnhhncy/connectTask',
    method: 'post',
    data: data
  })
}

// 修改数据调查-农户户内成员
export function updateNhhncy(data) {
  return request({
    url: '/home/homesteadnhhncy/edit',
    method: 'post',
    data: data
  })
}

// 删除数据调查-农户户内成员
export function delNhhncy(id) {
  return request({
    url: '/home/homesteadnhhncy/remove/' + id,
    method: 'get'
  })
}

