完善政府端
This commit is contained in:
18
government-backend/routes/approvalProcess.js
Normal file
18
government-backend/routes/approvalProcess.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const approvalProcessController = require('../controllers/approvalProcessController');
|
||||
const authMiddleware = require('../middleware/auth');
|
||||
|
||||
// 暂时注释掉认证中间件用于测试
|
||||
// router.use(authMiddleware);
|
||||
|
||||
// 审批流程管理路由
|
||||
router.get('/', approvalProcessController.getApprovalProcesses);
|
||||
router.get('/:id', approvalProcessController.getApprovalProcessById);
|
||||
router.post('/', approvalProcessController.createApprovalProcess);
|
||||
router.put('/:id', approvalProcessController.updateApprovalProcess);
|
||||
router.delete('/:id', approvalProcessController.deleteApprovalProcess);
|
||||
router.post('/:id/process', approvalProcessController.processApproval);
|
||||
router.patch('/:id/status', approvalProcessController.updateApprovalStatus);
|
||||
|
||||
module.exports = router;
|
||||
18
government-backend/routes/cattleAcademy.js
Normal file
18
government-backend/routes/cattleAcademy.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const cattleAcademyController = require('../controllers/cattleAcademyController');
|
||||
const authMiddleware = require('../middleware/auth');
|
||||
|
||||
// 暂时注释掉认证中间件用于测试
|
||||
// router.use(authMiddleware);
|
||||
|
||||
// 养牛学院资讯管理路由
|
||||
router.get('/', cattleAcademyController.getCattleAcademyList);
|
||||
router.get('/:id', cattleAcademyController.getCattleAcademyById);
|
||||
router.post('/', cattleAcademyController.createCattleAcademy);
|
||||
router.put('/:id', cattleAcademyController.updateCattleAcademy);
|
||||
router.delete('/:id', cattleAcademyController.deleteCattleAcademy);
|
||||
router.patch('/:id/status', cattleAcademyController.toggleCattleAcademyStatus);
|
||||
router.patch('/sort', cattleAcademyController.updateSort);
|
||||
|
||||
module.exports = router;
|
||||
17
government-backend/routes/deviceWarning.js
Normal file
17
government-backend/routes/deviceWarning.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const deviceWarningController = require('../controllers/deviceWarningController');
|
||||
// const authMiddleware = require('../middleware/auth'); // 假设有认证中间件
|
||||
|
||||
// router.use(authMiddleware); // 暂时注释掉认证中间件用于测试
|
||||
|
||||
// 设备预警管理路由
|
||||
router.get('/', deviceWarningController.getDeviceWarnings);
|
||||
router.get('/stats', deviceWarningController.getWarningStats);
|
||||
router.get('/:id', deviceWarningController.getDeviceWarningById);
|
||||
router.post('/', deviceWarningController.createDeviceWarning);
|
||||
router.put('/:id', deviceWarningController.updateDeviceWarning);
|
||||
router.delete('/:id', deviceWarningController.deleteDeviceWarning);
|
||||
router.patch('/:id/status', deviceWarningController.updateWarningStatus);
|
||||
|
||||
module.exports = router;
|
||||
17
government-backend/routes/epidemicActivity.js
Normal file
17
government-backend/routes/epidemicActivity.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const epidemicActivityController = require('../controllers/epidemicActivityController');
|
||||
const authMiddleware = require('../middleware/auth');
|
||||
|
||||
// 暂时注释掉认证中间件用于测试
|
||||
// router.use(authMiddleware);
|
||||
|
||||
// 防疫活动管理路由
|
||||
router.get('/', epidemicActivityController.getEpidemicActivities);
|
||||
router.get('/:id', epidemicActivityController.getEpidemicActivityById);
|
||||
router.post('/', epidemicActivityController.createEpidemicActivity);
|
||||
router.put('/:id', epidemicActivityController.updateEpidemicActivity);
|
||||
router.delete('/:id', epidemicActivityController.deleteEpidemicActivity);
|
||||
router.patch('/:id/status', epidemicActivityController.toggleActivityStatus);
|
||||
|
||||
module.exports = router;
|
||||
17
government-backend/routes/productionMaterialCertification.js
Normal file
17
government-backend/routes/productionMaterialCertification.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const productionMaterialCertificationController = require('../controllers/productionMaterialCertificationController');
|
||||
const authMiddleware = require('../middleware/auth');
|
||||
|
||||
// 暂时注释掉认证中间件用于测试
|
||||
// router.use(authMiddleware);
|
||||
|
||||
// 生资认证管理路由
|
||||
router.get('/', productionMaterialCertificationController.getProductionMaterialCertifications);
|
||||
router.get('/:id', productionMaterialCertificationController.getProductionMaterialCertificationById);
|
||||
router.post('/', productionMaterialCertificationController.createProductionMaterialCertification);
|
||||
router.put('/:id', productionMaterialCertificationController.updateProductionMaterialCertification);
|
||||
router.delete('/:id', productionMaterialCertificationController.deleteProductionMaterialCertification);
|
||||
router.patch('/:id/status', productionMaterialCertificationController.toggleCertificationStatus);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user