import request from '@/utils/request'

// 查询采精记录列表
export function listSperm(query) {
  return request({
    url: '/Sperm/Sperm/list',
    method: 'get',
    params: query
  })
}

// 查询采精记录详细
export function getSperm(id) {
  return request({
    url: '/Sperm/Sperm/' + id,
    method: 'get'
  })
}

// 新增采精记录
export function addSperm(data) {
  return request({
    url: '/Sperm/Sperm',
    method: 'post',
    data: data
  })
}

// 修改采精记录
export function updateSperm(data) {
  return request({
    url: '/Sperm/Sperm',
    method: 'put',
    data: data
  })
}

// 删除采精记录
export function delSperm(id) {
  return request({
    url: '/Sperm/Sperm/' + id,
    method: 'delete'
  })
}

// 根据耳号查询羊只信息
export function getSheepByManageTags(manageTags) {
  return request({
    url: '/Sperm/Sperm/getSheepByManageTags/' + manageTags,
    method: 'get'
  })
}

// 查询羊只耳号列表（用于下拉选择）
export function getSheepManageTagsList(query) {
  return request({
    url: '/Sperm/Sperm/sheepManageTagsList',
    method: 'get',
    params: query
  })
}