import request from '@/utils/request'

// 查询改品种记录列表
export function listChangeVariety(query) {
  return request({
    url: '/changeVariety/changeVariety/list',
    method: 'get',
    params: query
  })
}

// 查询改品种记录详细
export function getChangeVariety(id) {
  return request({
    url: '/changeVariety/changeVariety/' + id,
    method: 'get'
  })
}

// 新增改品种记录
export function addChangeVariety(data) {
  return request({
    url: '/changeVariety/changeVariety',
    method: 'post',
    data: data
  })
}

// 修改改品种记录
export function updateChangeVariety(data) {
  return request({
    url: '/changeVariety/changeVariety',
    method: 'put',
    data: data
  })
}

// 删除改品种记录
export function delChangeVariety(id) {
  return request({
    url: '/changeVariety/changeVariety/' + id,
    method: 'delete'
  })
}

//通过管理耳号获取羊只信息
export function getSheepByManageTags(manageTags) {
  return request({
    url: `/sheep/sheep/byManageTags/${manageTags}`,
    method: 'get'
  });
}