fix: get_pcoal_heat 时以work_date为准

This commit is contained in:
caoqianming 2024-05-08 16:06:08 +08:00
parent 757c3f4ad8
commit 035b9b392a
1 changed files with 2 additions and 2 deletions

View File

@ -69,8 +69,8 @@ def get_pcoal_heat(year_s: int, month_s: int, day_s: int):
return pcoal_heat return pcoal_heat
else: else:
try: try:
qs = SfLog.objects.get(end_time__year=year_s, end_time__month=month_s, end_time__day=day_s, qs = SfLog.objects.get(work_date__year=year_s, work_date__month=month_s, work_date__day=day_s,
mgroup__name='回转窑', shift__name='白班') mgroup__name='回转窑', shift__name__in=['白班', '早班']) # hardcode
if qs.pcoal_heat is None: if qs.pcoal_heat is None:
qs.pcoal_heat = 0 qs.pcoal_heat = 0
qs.save() qs.save()