feat: 投产分析接口
This commit is contained in:
parent
1490a35a32
commit
f3c31a5b39
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue