Files
zhyc-sheep-ui/src/api/Sperm/Sperm.js
2026-03-07 11:22:52 +08:00

79 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 validateRam(manageTags) {
return request({
url: '/Sperm/Sperm/validateRam/' + manageTags,
method: 'get'
})
}
// 根据耳号查询羊只ID兼容原有接口
export function getSheepIdByManageTags(manageTags) {
return request({
url: '/Sperm/Sperm/getSheepIdByManageTags/' + manageTags,
method: 'get'
})
}
// 导出采精记录
export function exportSperm(query) {
return request({
url: '/Sperm/Sperm/export',
method: 'post',
data: query,
responseType: 'blob'
})
}