feat: cal_enstat_when_pcoal_val_change 未完成
This commit is contained in:
parent
5402f2181c
commit
3dc647272a
|
@ -12,7 +12,7 @@ from django.db.models import Sum
|
|||
from apps.wpm.services import make_sflogs
|
||||
from apps.wpm.models import SfLog, StLog, StSfLog
|
||||
from django.utils.timezone import localtime
|
||||
|
||||
from django.db.models import F
|
||||
|
||||
@shared_task(base=CustomTask)
|
||||
def make_sflogs_simple(days=2):
|
||||
|
@ -91,4 +91,13 @@ def cal_shut_hour(stlogId: str):
|
|||
|
||||
|
||||
@shared_task(base=CustomTask)
|
||||
def cal_enstat_when_pcoal_val_change():
|
||||
def cal_enstat_when_pcoal_val_change(sflogId):
|
||||
from apps.enm.models import EnStat
|
||||
sflog = SfLog.objects.get(id=sflogId)
|
||||
mgroup = sflog.mgroup
|
||||
pcoal_val = sflog.pcoal_val
|
||||
year_s, month_s, day_s = sflog.get_ymd
|
||||
enstats = EnStat.objects.filter(mgroup__name='回转窑')
|
||||
for enstat in enstats:
|
||||
if type in ['hour_s', 'sflog', 'day_s']:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue