import request from '@/utils/request'

// 查询特困人员列表
export function listPersons(query) {
  return request({
    url: '/care/persons/list',
    method: 'get',
    params: query
  })
}

// 查询特困人员详细
export function getPersons(personId) {
  return request({
    url: '/care/persons/' + personId,
    method: 'get'
  })
}

// 新增特困人员
export function addPersons(data) {
  return request({
    url: '/care/persons',
    method: 'post',
    data: data
  })
}

// 修改特困人员
export function updatePersons(data) {
  return request({
    url: '/care/persons',
    method: 'put',
    data: data
  })
}

// 删除特困人员
export function delPersons(personId) {
  return request({
    url: '/care/persons/' + personId,
    method: 'delete'
  })
}
// 查询所有特困人员列表
export function listAllPersons(query) {
  return request({
    url: '/care/persons/listAll',
    method: 'get',
    params: query
  })
}