From 05c5c0ef811a6d9e67f88dc97f0feaa287ab5835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 23 Jun 2025 09:22:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/controllers/controllers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_machine_connect/controllers/controllers.py b/sf_machine_connect/controllers/controllers.py index 94161271..ba8ac697 100644 --- a/sf_machine_connect/controllers/controllers.py +++ b/sf_machine_connect/controllers/controllers.py @@ -681,7 +681,7 @@ class Sf_Dashboard_Connect(http.Controller): ) # 使用小时和分钟作为键,确保每个小时的数据有独立的键 - key = start_time.strftime('%H:%M:%S') # 只取小时:分钟:秒作为键 + key = (start_time + timedelta(hours=8)).strftime('%H:%M:%S') # 只取小时:分钟:秒作为键 # time_count_dict[key] = len(orders) time_count_dict[key] = sum(interval_orders.mapped('qty_produced')) @@ -718,7 +718,7 @@ class Sf_Dashboard_Connect(http.Controller): interval_orders = interval_orders.filtered(lambda o: o.routing_type == 'CNC加工' and o.production_line_id.name == line) # 使用小时和分钟作为键,确保每个小时的数据有独立的键 - key = start_time.strftime('%H:%M:%S') # 只取小时:分钟:秒作为键 + key = (start_time + timedelta(hours=8)).strftime('%H:%M:%S') # 只取小时:分钟:秒作为键 # time_count_dict[key] = len(orders) plan_count_dict[key] = sum(interval_orders.mapped('qty_production'))