石墨消解仪后端用nodejs编写,与嵌入式端交互和前端交互均用ws
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

37 lines
840 B

const Router = require("koa-router");
const router = new Router({ prefix: "/chicken" });
const { auth, hasAdminPermission } = require("../middleware/auth.middleware");
const {
verifyChickenNumberRightful,
} = require("../middleware/chicken.middleware");
const {
add,
info,
all,
batchs,
batchnum,
ratio,
noratioCoops,
allbatch,
} = require("../controller/chicken.controller");
router.post("/add", auth, verifyChickenNumberRightful, add);
// 根据id获取新进鸡苗记录详情。
router.get("/info", auth, info);
router.get("/allbatch", auth, allbatch);
// 根据条件查询新进记录
router.post("/all", auth, all);
router.get("/batchs", auth, batchs);
router.get("/batchnum", auth, batchnum);
router.post("/ratio", auth, ratio);
router.post("/coops/noratio", auth, noratioCoops);
module.exports = router;