工艺流程物料detail接口合并
This commit is contained in:
parent
52df9ddec5
commit
a30cab1c94
|
|
@ -18,7 +18,7 @@ class MaterialDetailSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
def get_processes_(self, obj):
|
def get_processes_(self, obj):
|
||||||
steps = UsedStep.objects.filter(subproduction__product=obj).values_list('step', flat=True)
|
steps = UsedStep.objects.filter(subproduction__product=obj).values_list('step', flat=True)
|
||||||
objs = Process.objects.filter(step_process__id__in=steps).order_by('number')
|
objs = Process.objects.filter(step_process__id__in=steps).distinct().order_by('number')
|
||||||
return ProcessSimpleSerializer(instance=objs, many=True).data
|
return ProcessSimpleSerializer(instance=objs, many=True).data
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue