From f3c31a5b39931b9ffa89532af94136d97faf6bfc Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 10 Sep 2024 08:50:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=95=E4=BA=A7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/datax.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/wpm/datax.py b/apps/wpm/datax.py index 5843df32..eb52d7c2 100644 --- a/apps/wpm/datax.py +++ b/apps/wpm/datax.py @@ -83,10 +83,7 @@ class AnaViewSet(GenericViewSet): 投产分析 """ now = timezone.now() - tomorrow = now + timedelta(days=1) now_2 = now.replace(hour=2, minute=0, second=0, microsecond=0) - timex_2 = tomorrow.replace(hour=2, minute=0, second=0, microsecond=0) - timex_8_ago = timex_2 - timedelta(days=8) mgroup: Mgroup = Mgroup.objects.get(name='退火') # 子状态 mstate_json = mgroup.process.mstate_json @@ -109,13 +106,5 @@ class AnaViewSet(GenericViewSet): ret['明日退火投产预测'] += item['t_count_use'] ret['今日退火投产预测'] += item['t_count_use'] - return ret - # # 交接记录 - # handover_qs = Handover.objects.filter(material__process=mgroup.process, send_mgroup=mgroup, type=Handover.H_NORMAL, - # submit_time__range=[timex_8_ago, timex_2]).values('id', 'submit_time', 'count') - # handover_qs_l = list(handover_qs) - - # # 生产入库 - # mioitem_qs = MIOItem.objects.filter(mio__mgroup=mgroup, material__process=mgroup.process, mio__type=MIO.MIO_TYPE_DO_IN, - # mio__submit_time__range=[timex_8_ago, timex_2]).values('id', 'mio__submit_time', 'count') + return Response(ret)