| Line 38... |
Line 38... |
| 38 |
get_doas_not_picked_up, get_return_orders_not_picked_up, get_orders_not_picked_up, get_rto_orders, get_order_list,\
|
38 |
get_doas_not_picked_up, get_return_orders_not_picked_up, get_orders_not_picked_up, get_rto_orders, get_order_list,\
|
| 39 |
get_order_ids_for_status, update_orders_as_paid_to_vendor, update_COD_agent,\
|
39 |
get_order_ids_for_status, update_orders_as_paid_to_vendor, update_COD_agent,\
|
| 40 |
get_refunded_orders_marked_paid, get_settlement_for_Cod, get_order_list_for_vendor, update_order_only_as_paid_to_vendor,\
|
40 |
get_refunded_orders_marked_paid, get_settlement_for_Cod, get_order_list_for_vendor, update_order_only_as_paid_to_vendor,\
|
| 41 |
get_all_verification_agents, get_all_attributes_for_order_id, set_order_attribute_for_transaction, get_billed_orders, get_all_return_orders,\
|
41 |
get_all_verification_agents, get_all_attributes_for_order_id, set_order_attribute_for_transaction, get_billed_orders, get_all_return_orders,\
|
| 42 |
mark_order_as_received_at_store, get_receive_pending_orders,\
|
42 |
mark_order_as_received_at_store, get_receive_pending_orders,\
|
| 43 |
get_received_at_store_orders, mark_orders_as_returned_from_store, set_order_attributes
|
43 |
get_received_at_store_orders, mark_orders_as_returned_from_store, set_order_attributes,\
|
| - |
|
44 |
get_orders_collection_at_store
|
| 44 |
|
45 |
|
| 45 |
|
46 |
|
| 46 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
47 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 47 |
to_t_alert, to_t_order, to_t_lineitem, to_t_payment_settlement, to_t_verification_agent, to_t_attribute
|
48 |
to_t_alert, to_t_order, to_t_lineitem, to_t_payment_settlement, to_t_verification_agent, to_t_attribute
|
| 48 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
49 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| Line 448... |
Line 449... |
| 448 |
try:
|
449 |
try:
|
| 449 |
return mark_orders_as_shipped_from_warehouse(warehouseId, providerId, cod, orderIds)
|
450 |
return mark_orders_as_shipped_from_warehouse(warehouseId, providerId, cod, orderIds)
|
| 450 |
finally:
|
451 |
finally:
|
| 451 |
close_session()
|
452 |
close_session()
|
| 452 |
|
453 |
|
| 453 |
def markOrdersAsReturnedFromStore(self, providerId, orderIds):
|
454 |
def markOrdersAsReturnedFromStore(self, providerId, orderIds, awbs):
|
| 454 |
"""
|
455 |
"""
|
| 455 |
Parameters:
|
456 |
Parameters:
|
| 456 |
- providerId
|
457 |
- providerId
|
| 457 |
- orderIds
|
458 |
- orderIds
|
| - |
|
459 |
- awbs
|
| 458 |
"""
|
460 |
"""
|
| 459 |
try:
|
461 |
try:
|
| 460 |
return mark_orders_as_returned_from_store(providerId, orderIds)
|
462 |
return mark_orders_as_returned_from_store(providerId, orderIds, awbs)
|
| 461 |
finally:
|
463 |
finally:
|
| 462 |
close_session()
|
464 |
close_session()
|
| 463 |
|
465 |
|
| 464 |
def setOrderAttributes(self, orderId, attributes):
|
466 |
def setOrderAttributes(self, orderId, attributes):
|
| 465 |
"""
|
467 |
"""
|
| Line 560... |
Line 562... |
| 560 |
try:
|
562 |
try:
|
| 561 |
orders = get_received_at_store_orders(storeId)
|
563 |
orders = get_received_at_store_orders(storeId)
|
| 562 |
return [to_t_order(order) for order in orders]
|
564 |
return [to_t_order(order) for order in orders]
|
| 563 |
finally:
|
565 |
finally:
|
| 564 |
close_session()
|
566 |
close_session()
|
| - |
|
567 |
|
| - |
|
568 |
def getOrdersCollectionAtStore(self, storeId, fromDate, toDate, onlyCod):
|
| 565 |
|
569 |
"""
|
| - |
|
570 |
Parameters:
|
| - |
|
571 |
- storeId
|
| - |
|
572 |
- fromDate
|
| - |
|
573 |
- toDate
|
| - |
|
574 |
- onlyCod
|
| - |
|
575 |
"""
|
| - |
|
576 |
try:
|
| - |
|
577 |
orders = get_orders_collection_at_store(storeId, to_py_date(fromDate), to_py_date(toDate), onlyCod)
|
| - |
|
578 |
return [to_t_order(order) for order in orders]
|
| - |
|
579 |
finally:
|
| - |
|
580 |
close_session()
|
| - |
|
581 |
|
| 566 |
def markAsRTOrders(self, providerId, returnedOrders):
|
582 |
def markAsRTOrders(self, providerId, returnedOrders):
|
| 567 |
"""
|
583 |
"""
|
| 568 |
Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
|
584 |
Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
|
| 569 |
Raises an exception if we encounter report for an AWB number that we did not ship.
|
585 |
Raises an exception if we encounter report for an AWB number that we did not ship.
|
| 570 |
|
586 |
|