|
@ -9,13 +9,24 @@ class DieController { |
|
|
async add(ctx, next) { |
|
|
async add(ctx, next) { |
|
|
const { house_id, coop_id, reason_id, die_number, put_time } = |
|
|
const { house_id, coop_id, reason_id, die_number, put_time } = |
|
|
ctx.request.body; |
|
|
ctx.request.body; |
|
|
ctx.body = Response(0, "新增死淘记录成功", null); |
|
|
|
|
|
|
|
|
const res = await addDieLog( |
|
|
|
|
|
house_id, |
|
|
|
|
|
coop_id, |
|
|
|
|
|
reason_id, |
|
|
|
|
|
die_number, |
|
|
|
|
|
put_time |
|
|
|
|
|
); |
|
|
|
|
|
ctx.body = Response(0, "新增死淘记录成功", res); |
|
|
} |
|
|
} |
|
|
async info(ctx, next) { |
|
|
async info(ctx, next) { |
|
|
ctx.body = Response(0, "查询单条死淘记录成功", null); |
|
|
|
|
|
|
|
|
const { house_id, coop_id } = ctx.request.body; |
|
|
|
|
|
const res = await getDieInfoById(house_id, coop_id); |
|
|
|
|
|
ctx.body = Response(0, "查询单条死淘记录成功", res); |
|
|
} |
|
|
} |
|
|
async all(ctx, next) { |
|
|
async all(ctx, next) { |
|
|
ctx.body = Response(0, "查询死淘记录成功", null); |
|
|
|
|
|
|
|
|
const { house_id } = ctx.request.body; |
|
|
|
|
|
const res = await getAllDieInfo(house_id); |
|
|
|
|
|
ctx.body = Response(0, "查询死淘记录成功", res); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|