Exemplo n.º 1
0
    def covert_data_list_to_serializer_list(order_list) :

        order_return_list = []

        for order_obj in order_list :

            orderSerializer = OrderSerializer()
            orderSerializer.is_part_completed = order_obj[0]
            orderSerializer.is_route_completed = order_obj[1]
            orderSerializer.file_no = order_obj[2]
            orderSerializer.order_no = order_obj[3]
            orderSerializer.supplier_code = order_obj[4]
            orderSerializer.plant_code = order_obj[5]
            orderSerializer.part_number  = order_obj[6]
            orderSerializer.part_name  = order_obj[7]
            orderSerializer.due_date  = order_obj[8]
            orderSerializer.order_qty  = order_obj[9]
            orderSerializer.package_no  = order_obj[10]
            orderSerializer.package_qty  = order_obj[11]
            orderSerializer.route_code  = order_obj[12]
            orderSerializer.route_trip  = order_obj[13]
            orderSerializer.updated_by  = order_obj[14]
            orderSerializer.updated_date  = order_obj[15]

            order_return_list.append(orderSerializer)
        
        return order_return_list
Exemplo n.º 2
0
    def covert_data_list_to_serializer_list(pickup_list):

        pickup_return_list = []

        for pickup_obj in pickup_list:

            order_serializer_obj = OrderSerializer()

            order_serializer_obj.pickup_no = pickup_obj[0]
            order_serializer_obj.supplier_code = pickup_obj[1]
            order_serializer_obj.plant_code = pickup_obj[2]
            order_serializer_obj.route_code = pickup_obj[3]
            order_serializer_obj.route_trip = pickup_obj[4]
            order_serializer_obj.due_date = pickup_obj[5]
            order_serializer_obj.order_count = pickup_obj[6]

            pickup_return_list.append(order_serializer_obj)

        return pickup_return_list