feat(c2): plan/order 权限码/错误码/APIS

This commit is contained in:
liuyun 2026-10-14 22:13:53 +08:00
parent 766d8c7218
commit 515e22453c
2 changed files with 18 additions and 0 deletions

View File

@ -44,6 +44,12 @@ export const ErrorCodes = {
ELDER_ID_CARD_EXISTS: 43002, ELDER_ID_CARD_EXISTS: 43002,
ELDER_STATUS_REASON_REQUIRED: 43003, ELDER_STATUS_REASON_REQUIRED: 43003,
ELDER_LEVEL_REQUIRES_EVIDENCE: 43004, ELDER_LEVEL_REQUIRES_EVIDENCE: 43004,
// 服务机构端·计划/工单(44)
PLAN_NOT_FOUND: 44001,
PLAN_ITEM_RULE: 44002,
ORDER_NOT_FOUND: 44003,
ORDER_CONFLICT: 44004,
ORDER_STATUS_INVALID: 44005,
} as const; } as const;
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes]; export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];

View File

@ -98,6 +98,18 @@ export const APIS: { code: string; name: string; method: string; path: string; p
{ code: Permissions.elder.statusChange, name: '变更待遇状态', method: 'POST', path: '/api/v1/elder/:id/status', parent: 'elder' }, { code: Permissions.elder.statusChange, name: '变更待遇状态', method: 'POST', path: '/api/v1/elder/:id/status', parent: 'elder' },
{ code: Permissions.elder.detail, name: '状态日志', method: 'GET', path: '/api/v1/elder/:id/status/log', parent: 'elder' }, { code: Permissions.elder.detail, name: '状态日志', method: 'GET', path: '/api/v1/elder/:id/status/log', parent: 'elder' },
{ code: Permissions.elder.create, name: '上传评估结论', method: 'POST', path: '/api/v1/elder/assess-evidence', parent: 'elder' }, { code: Permissions.elder.create, name: '上传评估结论', method: 'POST', path: '/api/v1/elder/assess-evidence', parent: 'elder' },
// 服务机构端·计划/工单(C2)
{ code: Permissions.plan.create, name: '制定计划', method: 'POST', path: '/api/v1/plan', parent: 'elder' },
{ code: Permissions.plan.change, name: '变更计划', method: 'POST', path: '/api/v1/plan/change', parent: 'elder' },
{ code: Permissions.plan.detail, name: '计划详情', method: 'GET', path: '/api/v1/plan/:id', parent: 'elder' },
{ code: Permissions.plan.confirm, name: '确认计划', method: 'POST', path: '/api/v1/plan/:id/confirm', parent: 'elder' },
{ code: Permissions.order.generate, name: '生成工单', method: 'POST', path: '/api/v1/order/generate', parent: 'schedule' },
{ code: Permissions.order.assign, name: '派单', method: 'POST', path: '/api/v1/order/assign', parent: 'schedule' },
{ code: Permissions.order.reassign, name: '调单', method: 'POST', path: '/api/v1/order/:id/reassign', parent: 'schedule' },
{ code: Permissions.order.cancel, name: '取消工单', method: 'POST', path: '/api/v1/order/:id/cancel', parent: 'schedule' },
{ code: Permissions.order.detail, name: '工单详情', method: 'GET', path: '/api/v1/order/:id', parent: 'schedule' },
{ code: Permissions.order.today, name: '今日任务', method: 'GET', path: '/api/v1/order/today', parent: 'schedule' },
{ code: Permissions.elder.svcSave, name: '个人项目库', method: 'PUT', path: '/api/v1/elder-svc/:elderId', parent: 'elder' },
]; ];
/** 按钮资源(纯前端按钮,无独立受控接口)。 */ /** 按钮资源(纯前端按钮,无独立受控接口)。 */