diff --git a/ruoyi-fastapi-backend/module_admin/system/service/statistics_service.py b/ruoyi-fastapi-backend/module_admin/system/service/statistics_service.py index cb27ed0..37a5f63 100644 --- a/ruoyi-fastapi-backend/module_admin/system/service/statistics_service.py +++ b/ruoyi-fastapi-backend/module_admin/system/service/statistics_service.py @@ -59,10 +59,10 @@ class StatisticsService: total_work_orders = len(all_work_orders) # 统计已完成测试工单数量(假设状态值2表示已完成) - completed_work_orders = len([work_order for work_order in all_work_orders if work_order['test_status'] == 2]) + completed_work_orders = len([work_order for work_order in all_work_orders if work_order.test_status == 2]) # 统计进行中测试工单数量(假设状态值1表示进行中) - processing_work_orders = len([work_order for work_order in all_work_orders if work_order['test_status'] == 1]) + processing_work_orders = len([work_order for work_order in all_work_orders if work_order.test_status == 1]) return { 'totalWorkOrders': total_work_orders,