import request from '@/utils/request'

// 查询护理公司列表
export function listCompanies(query) {
  return request({
    url: '/care/companies/list',
    method: 'get',
    params: query
  })
}

// 查询护理公司详细
export function getCompanies(companyId) {
  return request({
    url: '/care/companies/' + companyId,
    method: 'get'
  })
}

// 新增护理公司
export function addCompanies(data) {
  return request({
    url: '/care/companies',
    method: 'post',
    data: data
  })
}

// 修改护理公司
export function updateCompanies(data) {
  return request({
    url: '/care/companies',
    method: 'put',
    data: data
  })
}

// 删除护理公司
export function delCompanies(companyId) {
  return request({
    url: '/care/companies/' + companyId,
    method: 'delete'
  })
}
// 用户密码重置
export function resetPassword(userId) {
  return request({
    url: '/care/companies/resetPassword/' + userId,
    method: 'put'
  })
}
// 查询护理公司统计列表
export function dispatchCompanies(query) {
  return request({
    url: '/care/companies/dispatch',
    method: 'get',
    params: query
  })
}
