import request from '@/utils/request'

// 查询羊舍管理列表
export function listSheepfold_management(query) {
  return request({
    url: '/sheepfold_management/sheepfold_management/list',
    method: 'get',
    params: query
  })
}

// 查询羊舍管理详细
export function getSheepfold_management(id) {
  return request({
    url: '/sheepfold_management/sheepfold_management/' + id,
    method: 'get'
  })
}

// 新增羊舍管理
export function addSheepfold_management(data) {
  return request({
    url: '/sheepfold_management/sheepfold_management',
    method: 'post',
    data: data
  })
}

// 修改羊舍管理
export function updateSheepfold_management(data) {
  return request({
    url: '/sheepfold_management/sheepfold_management',
    method: 'put',
    data: data
  })
}

// 删除羊舍管理
export function delSheepfold_management(id) {
  return request({
    url: '/sheepfold_management/sheepfold_management/' + id,
    method: 'delete'
  })
}

// 检查羊舍编号是否已存在
export function checkSheepfoldNoExist(ranchId, sheepfoldTypeId, sheepfoldNo) {
  return request({
    url: '/sheepfold_management/sheepfold_management/checkSheepfoldNoExist',
    method: 'get',
    params: {
      ranchId: ranchId,
      sheepfoldTypeId: sheepfoldTypeId,
      sheepfoldNo: sheepfoldNo
    }
  })
}
