|
|
@ -3,7 +3,9 @@ const { |
|
|
|
getChickenInfoById, |
|
|
|
getAllChickenInfo, |
|
|
|
getChickenInfoByHouseId, |
|
|
|
getBatchNumbers, |
|
|
|
getBatchNumbersByHouseId, |
|
|
|
getNoRatioCoopsByBatchNumber, |
|
|
|
getFeedConversionRatio, |
|
|
|
} = require("../service/chicken.service"); |
|
|
|
const Response = require("../utils/response"); |
|
|
@ -65,12 +67,24 @@ class ChickenController { |
|
|
|
ctx.body = Response(0, "查询批次号简易信息成功", res); |
|
|
|
} |
|
|
|
|
|
|
|
async allbatch(ctx, next) { |
|
|
|
const { house_id } = ctx.request.query; |
|
|
|
const res = await getBatchNumbers(house_id); |
|
|
|
ctx.body = Response(0, "查询所有未出栏批次号成功", res); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取料肉比
|
|
|
|
async ratio(ctx, next) { |
|
|
|
const { house_id } = ctx.request.query; |
|
|
|
const res = await getFeedConversionRatio(house_id); |
|
|
|
ctx.body = Response(0, "查询料肉比成功", res); |
|
|
|
} |
|
|
|
|
|
|
|
async noratioCoops(ctx, next) { |
|
|
|
const { batch_number } = ctx.request.body; |
|
|
|
const res = await getNoRatioCoopsByBatchNumber(batch_number); |
|
|
|
ctx.body = Response(0, "查询当前批次号下没有料肉比记录的鸡舍成功", res); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
module.exports = new ChickenController(); |