手动获取筛选结果
queryset = self.filter_queryset(self.get_queryset())
手动序列化
objs = StockLackPicking.objects.using('read_default').filter(id__in=ids)
serializers = StockLackPickingSerializer(objs, many=True)
serializers_data = serializers.data
data_dict = {}
from utils.common import handel_utc_time
for data in serializers_data:
data['create_date'] = handel_utc_time(data['create_date'])
data['actual_date'] = handel_utc_time(data['actual_date'])
order_id = data['id']
data_dict[order_id] = data
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/18440.html