feat: 物料统计数量接口
This commit is contained in:
parent
2b9e3322ac
commit
1e379d412c
|
@ -59,6 +59,18 @@ class MaterialViewSet(CustomModelViewSet):
|
|||
daoru_material(settings.BASE_DIR + request.data.get('path', ''))
|
||||
return Response()
|
||||
|
||||
@action(methods=['post'], detail=True, serializer_class=Serializer, perms_map={'post': 'material.create'})
|
||||
@transaction.atomic
|
||||
def cal_count(self, request, *args, **kwargs):
|
||||
"""统计数量
|
||||
|
||||
统计数量
|
||||
"""
|
||||
ins = self.get_object()
|
||||
from apps.mtm.services_2 import cal_material_count
|
||||
cal_material_count([ins.id])
|
||||
return Response()
|
||||
|
||||
@action(methods=['put'], detail=True, serializer_class=Serializer, perms_map={'put': '*'})
|
||||
@transaction.atomic
|
||||
def set_week_esitimate_consume(self, request, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue