import request from '@/utils/request'

//查询列表
export function getList(data){
  return request({
    url:'/home/lz/list',
    method:'get',
    params:data
  })
}

//删除列表项
export function removeList(id){
  return request({
    url:'/home/lz/remove/'+id,
    method:'get'
  })
}

//宅基地流转详情
export function getLz(id){
  return request({
    url:'/home/lz/get/'+id,
    method:'get'
  })
}

//宅基地代码
export function zjdzd(){
  return request({
    url:'/home/homesteadzjdzdxx/list',
    method:'get'
  })
}
//通过宅基地编码查询宅基地信息
export function queryGeoZjdzd(query) {
  return request({
    url: '/house/lz/queryGeoZjdzd',
    method: 'get',
    params: query
  })
}

//宅基地退出申请人信息
export function getExitProposerDetail() {
  return request({
    url: '/house/mobile/exit/proposer',
    method: 'get'
  })
}

// 查询权利人列表
export function obligeeList(query) {
  return request({
    url: '/house/obligee/obligeeHouselist',
    method: 'get',
    params: query
  })
}

// 条件查询使用权人列表
export function selectTHouseBaseObligeeMapList(query) {
  return request({
    url: '/house/obligee/selectTHouseBaseObligeeMapList',
    method: 'get',
    params: query
  })
}

export function getObligeeList(query) {
  return request({
    url: '/house/obligee/selectObligeeListByName',
    method: 'get',
    params: query
  })
}

//权利人代码
export function getByZjddm(data){
  return request({
    url:'/house/obligee/getByZjddm',
    method:'get',
    params:data
  })
}

//修改保存宅基地流转
export function edit(data){
  return request({
    url:'/house/lz/edit',
    method:'post',
    data:data
  })
}

//修改保存宅基地流转
export function goApply(id){
  return request({
    url:'/house/lz/submitApply/'+id,
    method:'post',
  })
}

//修改保存宅基地流转
export function homeLzAdd(data){
  return request({
    url:'/home/lz/add',
    method:'post',
    data:data
  })
}

//修改保存宅基地流转
export function selectAllLicense(id){
  return request({
    url:'/house/allinformation/license/'+id,
    method:'get'
  })
}

//宅基地信息
export function getByLyZjddm(data){
  console.log(data);
  return request({
    url:'/house/land/getByZjddm/'+ data,
    method:'get',
  })
}

// 宅基地信息条件查询
export function selectHomesteadObligeeMapList(query) {
  return request({
    url: '/home/homesteadshyqr/selectHomesteadObligeeMapList',
    method: 'get',
    params: query
  })
}

//宅基地使用权流转农户查询
export function queryHouserBaseNh(query) {
  return request({
    url: '/house/lz/queryHouserBaseNh',
    method: 'get',
    params: query
  })
}
