|
@ -1,6 +1,7 @@ |
|
|
const { |
|
|
const { |
|
|
addChicken, |
|
|
addChicken, |
|
|
getChickenInfoById, |
|
|
getChickenInfoById, |
|
|
|
|
|
getAllChickenInfo, |
|
|
} = require("../service/chicken.service"); |
|
|
} = require("../service/chicken.service"); |
|
|
const Response = require("../utils/response"); |
|
|
const Response = require("../utils/response"); |
|
|
|
|
|
|
|
@ -37,6 +38,17 @@ class ChickenController { |
|
|
const res = await getChickenInfoById(id, log_name); |
|
|
const res = await getChickenInfoById(id, log_name); |
|
|
ctx.body = Response(0, "查询单个新进记录成功", res); |
|
|
ctx.body = Response(0, "查询单个新进记录成功", res); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async all(ctx, next) { |
|
|
|
|
|
const { batch_number, coop_ids, put_time, house_id } = ctx.request.body; |
|
|
|
|
|
const res = await getAllChickenInfo( |
|
|
|
|
|
batch_number, |
|
|
|
|
|
coop_ids, |
|
|
|
|
|
put_time, |
|
|
|
|
|
house_id |
|
|
|
|
|
); |
|
|
|
|
|
ctx.body = Response(0, "查询新进记录成功", res); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
module.exports = new ChickenController(); |
|
|
module.exports = new ChickenController(); |