import request from '@/utils/request'

// 查询药房列表
export function listMedicalPharmacy(query) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy/list',
    method: 'get',
    params: query
  })
}

// 查询药房详细
export function getMedicalPharmacy(id) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy/' + id,
    method: 'get'
  })
}

// 新增药房
export function addMedicalPharmacy(data) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy',
    method: 'post',
    data: data
  })
}

// 修改药房
export function updateMedicalPharmacy(data) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy',
    method: 'put',
    data: data
  })
}

// 删除药房
export function delMedicalPharmacy(id) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy/' + id,
    method: 'delete'
  })
}

// 导出药房
export function exportMedicalPharmacy(query) {
  return request({
    url: '/yfc-admin/pharmacy/MedicalPharmacy/export',
    method: 'get',
    params: query
  })
}

//查看使用范围
export function boundary(query) {
  return request({
    url: '/yfc-admin/pharmacy/storage/boundary/' + query,
    method: 'get',
  })
}
