From 035b9b392a4f5dc1dd46718246dfa9720369ae3f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 8 May 2024 16:06:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20get=5Fpcoal=5Fheat=20=E6=97=B6=E4=BB=A5w?= =?UTF-8?q?ork=5Fdate=E4=B8=BA=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 74448541..4dab0779 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -69,8 +69,8 @@ def get_pcoal_heat(year_s: int, month_s: int, day_s: int): return pcoal_heat else: try: - qs = SfLog.objects.get(end_time__year=year_s, end_time__month=month_s, end_time__day=day_s, - mgroup__name='回转窑', shift__name='白班') + qs = SfLog.objects.get(work_date__year=year_s, work_date__month=month_s, work_date__day=day_s, + mgroup__name='回转窑', shift__name__in=['白班', '早班']) # hardcode if qs.pcoal_heat is None: qs.pcoal_heat = 0 qs.save()