完善小程序
This commit is contained in:
@@ -83,6 +83,47 @@ const { jwtAuth } = require('../middleware/auth');
|
||||
*/
|
||||
router.get('/stats', jwtAuth, deviceAlertController.getAlertStats);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/device-alerts/export:
|
||||
* get:
|
||||
* tags:
|
||||
* - 设备预警
|
||||
* summary: 导出设备预警列表到Excel
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: alert_level
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 预警级别
|
||||
* - in: query
|
||||
* name: alert_type
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 预警类型
|
||||
* - in: query
|
||||
* name: status
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 处理状态
|
||||
* - in: query
|
||||
* name: is_read
|
||||
* schema:
|
||||
* type: boolean
|
||||
* description: 是否已读
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 导出成功
|
||||
* content:
|
||||
* application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
*/
|
||||
router.get('/export', jwtAuth, deviceAlertController.exportToExcel);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/device-alerts:
|
||||
|
||||
@@ -10,6 +10,50 @@ const { jwtAuth, requirePermission } = require('../middleware/auth');
|
||||
* description: 待安装任务管理
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/installation-tasks/stats:
|
||||
* get:
|
||||
* summary: 获取安装任务统计数据
|
||||
* tags: [InstallationTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 获取成功
|
||||
*/
|
||||
router.get('/stats', jwtAuth, requirePermission('installation_tasks:read'), installationTaskController.getInstallationTaskStats);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/installation-tasks/export:
|
||||
* get:
|
||||
* summary: 导出待安装任务到Excel
|
||||
* tags: [InstallationTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: policyNumber
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 保单编号
|
||||
* - in: query
|
||||
* name: keyword
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 关键字搜索
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 导出成功
|
||||
* content:
|
||||
* application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
*/
|
||||
router.get('/export', jwtAuth, requirePermission('installation_tasks:read'), installationTaskController.exportToExcel);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/installation-tasks:
|
||||
@@ -230,38 +274,4 @@ router.delete('/:id', jwtAuth, requirePermission('installation_tasks:delete'), i
|
||||
*/
|
||||
router.post('/batch/operate', jwtAuth, requirePermission('installation_tasks:update'), installationTaskController.batchOperateInstallationTasks);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/installation-tasks/export:
|
||||
* get:
|
||||
* summary: 导出待安装任务数据
|
||||
* tags: [InstallationTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: ids
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 任务ID列表(逗号分隔)
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 导出成功
|
||||
*/
|
||||
router.get('/export', jwtAuth, requirePermission('installation_tasks:read'), installationTaskController.exportInstallationTasks);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/installation-tasks/stats:
|
||||
* get:
|
||||
* summary: 获取安装任务统计数据
|
||||
* tags: [InstallationTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 获取成功
|
||||
*/
|
||||
router.get('/stats', jwtAuth, requirePermission('installation_tasks:read'), installationTaskController.getInstallationTaskStats);
|
||||
|
||||
module.exports = router;
|
||||
@@ -174,6 +174,9 @@ router.get('/', jwtAuth, checkPermission('insurance_type', 'read'),
|
||||
* '500':
|
||||
* description: 服务器内部错误
|
||||
*/
|
||||
// 导出险种列表到Excel
|
||||
router.get('/export', jwtAuth, checkPermission('insurance_type', 'read'), insuranceTypeController.exportToExcel);
|
||||
|
||||
// 获取单个险种详情
|
||||
router.get('/:id', jwtAuth, checkPermission('insurance_type', 'read'),
|
||||
insuranceTypeController.getInsuranceTypeById
|
||||
|
||||
@@ -8,7 +8,8 @@ const {
|
||||
updateLivestockClaimPayment,
|
||||
getLivestockClaimStats,
|
||||
updateLivestockClaim,
|
||||
deleteLivestockClaim
|
||||
deleteLivestockClaim,
|
||||
exportToExcel
|
||||
} = require('../controllers/livestockClaimController');
|
||||
const { authenticateToken, requirePermission } = require('../middleware/auth');
|
||||
|
||||
@@ -33,6 +34,9 @@ router.get('/', authenticateToken, requirePermission('livestock_claim:read'), ge
|
||||
// 获取生资理赔统计
|
||||
router.get('/stats', authenticateToken, requirePermission('livestock_claim:read'), getLivestockClaimStats);
|
||||
|
||||
// 导出理赔列表到Excel
|
||||
router.get('/export', authenticateToken, requirePermission('livestock_claim:read'), exportToExcel);
|
||||
|
||||
// 获取单个生资理赔详情
|
||||
router.get('/:id', authenticateToken, requirePermission('livestock_claim:read'), getLivestockClaimById);
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ const {
|
||||
updateLivestockPolicy,
|
||||
updateLivestockPolicyStatus,
|
||||
deleteLivestockPolicy,
|
||||
getLivestockPolicyStats
|
||||
getLivestockPolicyStats,
|
||||
exportToExcel
|
||||
} = require('../controllers/livestockPolicyController');
|
||||
const { jwtAuth, checkPermission } = require('../middleware/auth');
|
||||
|
||||
@@ -17,6 +18,9 @@ router.get('/', jwtAuth, checkPermission('insurance:policy', 'view'), getLivesto
|
||||
// 获取生资保单统计
|
||||
router.get('/stats', jwtAuth, checkPermission('insurance:policy', 'view'), getLivestockPolicyStats);
|
||||
|
||||
// 导出生资保单列表到Excel
|
||||
router.get('/export', jwtAuth, checkPermission('insurance:policy', 'view'), exportToExcel);
|
||||
|
||||
// 获取单个生资保单详情
|
||||
router.get('/:id', jwtAuth, checkPermission('insurance:policy', 'view'), getLivestockPolicyById);
|
||||
|
||||
|
||||
@@ -169,6 +169,9 @@ router.get('/', jwtAuth, checkPermission('system', 'read'), operationLogControll
|
||||
*/
|
||||
router.get('/stats', jwtAuth, checkPermission('system', 'read'), operationLogController.getOperationStats);
|
||||
|
||||
// 导出操作日志到Excel
|
||||
router.get('/export', jwtAuth, checkPermission('system', 'read'), operationLogController.exportToExcel);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/operation-logs/{id}:
|
||||
|
||||
@@ -18,6 +18,9 @@ router.post('/', jwtAuth, checkPermission('insurance:policy', 'create'),
|
||||
policyController.createPolicy
|
||||
);
|
||||
|
||||
// 导出保单列表到Excel
|
||||
router.get('/export', jwtAuth, checkPermission('insurance:policy', 'view'), policyController.exportToExcel);
|
||||
|
||||
// 获取单个保单详情
|
||||
router.get('/:id', jwtAuth, checkPermission('insurance:policy', 'view'),
|
||||
policyController.getPolicyById
|
||||
|
||||
@@ -10,6 +10,50 @@ const { jwtAuth, requirePermission } = require('../middleware/auth');
|
||||
* description: 监管任务管理
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/supervision-tasks/stats:
|
||||
* get:
|
||||
* summary: 获取监管任务统计信息
|
||||
* tags: [SupervisionTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 获取成功
|
||||
*/
|
||||
router.get('/stats', jwtAuth, requirePermission('supervision_tasks:read'), SupervisoryTaskController.getStatistics);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/supervision-tasks/export:
|
||||
* get:
|
||||
* summary: 导出监管任务列表到Excel
|
||||
* tags: [SupervisionTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: policyNumber
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 保单编号
|
||||
* - in: query
|
||||
* name: customerName
|
||||
* schema:
|
||||
* type: string
|
||||
* description: 客户姓名
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 导出成功
|
||||
* content:
|
||||
* application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
*/
|
||||
router.get('/export', jwtAuth, requirePermission('supervision_tasks:read'), SupervisoryTaskController.exportToExcel);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/supervision-tasks:
|
||||
@@ -253,18 +297,4 @@ router.delete('/:id', jwtAuth, requirePermission('supervision_tasks:delete'), Su
|
||||
*/
|
||||
router.post('/batch/operate', jwtAuth, requirePermission('supervision_tasks:create'), SupervisoryTaskController.bulkCreate);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/supervision-tasks/stats:
|
||||
* get:
|
||||
* summary: 获取监管任务统计信息
|
||||
* tags: [SupervisionTasks]
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* responses:
|
||||
* 200:
|
||||
* description: 获取成功
|
||||
*/
|
||||
router.get('/stats', jwtAuth, requirePermission('supervision_tasks:read'), SupervisoryTaskController.getStatistics);
|
||||
|
||||
module.exports = router;
|
||||
@@ -13,6 +13,9 @@ router.get('/profile', jwtAuth, userController.getProfile);
|
||||
// 更新个人资料(不需要特殊权限,用户可以更新自己的资料)
|
||||
router.put('/profile', jwtAuth, userController.updateProfile);
|
||||
|
||||
// 导出用户列表(必须在 /:id 之前)
|
||||
router.get('/export', jwtAuth, checkPermission('user', 'read'), userController.exportToExcel);
|
||||
|
||||
// 获取单个用户信息
|
||||
router.get('/:id', jwtAuth, checkPermission('user', 'read'), userController.getUser);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user