From af9f57371a2406c5e7e442560abbfed7a0229d40 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Mon, 16 Mar 2026 16:33:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84OCR=E6=9C=8D=E5=8A=A1=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9B=B8=E5=85=B3=E7=9A=84API=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20Bug:=20system=5Frouter=E8=BF=99=E9=87=8C=E6=9C=89bu?= =?UTF-8?q?g=20Fixes=20#560?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/routers/system_router.py | 17 ----------------- web/src/apis/system_api.js | 6 ------ 2 files changed, 23 deletions(-) diff --git a/server/routers/system_router.py b/server/routers/system_router.py index b19d365b..4621a632 100644 --- a/server/routers/system_router.py +++ b/server/routers/system_router.py @@ -149,23 +149,6 @@ async def reload_info_config(current_user: User = Depends(get_admin_user)): # ============================================================================= -@system.get("/ocr/stats") -async def get_ocr_stats(current_user: User = Depends(get_admin_user)): - """ - 获取OCR服务使用统计信息 - 返回各个OCR服务的处理统计和性能指标 - """ - try: - from src.plugins._ocr import get_ocr_stats - - stats = get_ocr_stats() - - return {"status": "success", "stats": stats, "message": "OCR统计信息获取成功"} - except Exception as e: - logger.error(f"获取OCR统计信息失败: {str(e)}") - return {"status": "error", "stats": {}, "message": f"获取OCR统计信息失败: {str(e)}"} - - @system.get("/ocr/health") async def check_ocr_services_health(current_user: User = Depends(get_admin_user)): """ diff --git a/web/src/apis/system_api.js b/web/src/apis/system_api.js index 868105ad..3525eed3 100644 --- a/web/src/apis/system_api.js +++ b/web/src/apis/system_api.js @@ -85,12 +85,6 @@ export const brandApi = { // ============================================================================= export const ocrApi = { - /** - * 获取OCR服务统计信息 - * @returns {Promise} - OCR统计信息 - */ - getStats: async () => apiAdminGet('/api/system/ocr/stats'), - /** * 获取OCR服务健康状态 * @returns {Promise} - OCR健康状态