feat: gen_number_with_rule按生产日志中的工段过滤
This commit is contained in:
parent
d19fee8e6f
commit
3906b0f744
|
@ -273,6 +273,9 @@ class MlogViewSet(CustomModelViewSet):
|
||||||
# data = list(data_dict.values())
|
# data = list(data_dict.values())
|
||||||
if self.request.query_params.get('with_wpr', False) == 'yes':
|
if self.request.query_params.get('with_wpr', False) == 'yes':
|
||||||
pass
|
pass
|
||||||
|
# wpr_dict = {item["id"]: None for item in data}
|
||||||
|
# wpr_out_qs = Mlogbw.objects.filter(mlogb__mlog__id__in=wpr_dict.keys(),
|
||||||
|
# mlogb__material_out__isnull=False).values_list('mlogb__mlog', 'number')
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@lock_model_record_d_method(Mlog)
|
@lock_model_record_d_method(Mlog)
|
||||||
|
@ -872,7 +875,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
||||||
c_month = handle_date.month
|
c_month = handle_date.month
|
||||||
m_model = material_out.model
|
m_model = material_out.model
|
||||||
# 按生产日志查询
|
# 按生产日志查询
|
||||||
wpr = Wpr.objects.filter(wpr_mlogbw__mlogb__material_out=material_out,
|
wpr = Wpr.objects.filter(wpr_mlogbw__mlogb__mlog__mgroup=mlog.mgroup,
|
||||||
wpr_mlogbw__mlogb__mlog__is_fix=False,
|
wpr_mlogbw__mlogb__mlog__is_fix=False,
|
||||||
wpr_mlogbw__mlogb__mlog__submit_time__isnull=False,
|
wpr_mlogbw__mlogb__mlog__submit_time__isnull=False,
|
||||||
wpr_mlogbw__mlogb__mlog__handle_date__year=c_year, wpr_mlogbw__mlogb__mlog__handle_date__month=c_month).order_by("number").last()
|
wpr_mlogbw__mlogb__mlog__handle_date__year=c_year, wpr_mlogbw__mlogb__mlog__handle_date__month=c_month).order_by("number").last()
|
||||||
|
|
Loading…
Reference in New Issue