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'))