| Line 7... |
Line 7... |
| 7 |
from shop2020.config.client.ConfigClient import ConfigClient
|
7 |
from shop2020.config.client.ConfigClient import ConfigClient
|
| 8 |
from shop2020.model.v1.inventory.impl import DataService
|
8 |
from shop2020.model.v1.inventory.impl import DataService
|
| 9 |
from shop2020.model.v1.inventory.impl.Convertors import to_t_item_inventory, \
|
9 |
from shop2020.model.v1.inventory.impl.Convertors import to_t_item_inventory, \
|
| 10 |
to_t_warehouse, to_t_vendor_item_pricing, to_t_vendor, to_t_vendor_item_mapping, \
|
10 |
to_t_warehouse, to_t_vendor_item_pricing, to_t_vendor, to_t_vendor_item_mapping, \
|
| 11 |
to_t_item_stock_purchase_params, to_t_oos_status, to_t_amazon_inventory_snapshot, \
|
11 |
to_t_item_stock_purchase_params, to_t_oos_status, to_t_amazon_inventory_snapshot, \
|
| 12 |
to_t_amazon_fba_inventory_snapshot,to_t_snapdeal_inventory_snapshot,\
|
12 |
to_t_amazon_fba_inventory_snapshot, to_t_snapdeal_inventory_snapshot, \
|
| 13 |
to_t_hold_inventory_detail, to_t_flipkart_inventory_snapshot
|
13 |
to_t_hold_inventory_detail, to_t_flipkart_inventory_snapshot
|
| 14 |
from shop2020.model.v1.inventory.impl.DataAcessors import add_warehouse, \
|
14 |
from shop2020.model.v1.inventory.impl.DataAcessors import add_warehouse, \
|
| 15 |
update_inventory, retire_warehouse, get_item_availability_for_warehouse, \
|
15 |
update_inventory, retire_warehouse, get_item_availability_for_warehouse, \
|
| 16 |
get_item_availability_for_location, get_all_warehouses_by_status, get_Warehouse, \
|
16 |
get_item_availability_for_location, get_all_warehouses_by_status, get_Warehouse, \
|
| 17 |
get_all_items_for_warehouse, close_session, add_vendor, \
|
17 |
get_all_items_for_warehouse, close_session, add_vendor, \
|
| Line 23... |
Line 23... |
| 23 |
get_item_keys_to_be_processed, reset_availability, get_shipping_locations, \
|
23 |
get_item_keys_to_be_processed, reset_availability, get_shipping_locations, \
|
| 24 |
initialize, get_inventory_snapshot, clear_item_availability_cache, \
|
24 |
initialize, get_inventory_snapshot, clear_item_availability_cache, \
|
| 25 |
reset_availability_for_warehouse, get_vendor, get_pending_orders_inventory, \
|
25 |
reset_availability_for_warehouse, get_vendor, get_pending_orders_inventory, \
|
| 26 |
is_order_billable, get_our_warehouse_id_for_vendor, \
|
26 |
is_order_billable, get_our_warehouse_id_for_vendor, \
|
| 27 |
get_item_availability_for_our_warehouses, get_monitored_warehouses_for_vendors, \
|
27 |
get_item_availability_for_our_warehouses, get_monitored_warehouses_for_vendors, \
|
| - |
|
28 |
get_ignored_warehouseids_and_itemids, \
|
| 28 |
get_ignored_warehouseids_and_itemids,insert_item_to_ignore_inventory_update_list, \
|
29 |
insert_item_to_ignore_inventory_update_list, \
|
| - |
|
30 |
delete_item_from_ignore_inventory_update_list, \
|
| 29 |
delete_item_from_ignore_inventory_update_list,get_all_ignored_inventoryupdate_items_count, \
|
31 |
get_all_ignored_inventoryupdate_items_count, get_ignored_inventoryupdate_itemids, \
|
| 30 |
get_ignored_inventoryupdate_itemids, update_item_stock_purchase_params, \
|
32 |
update_item_stock_purchase_params, get_item_stock_purchase_params, \
|
| 31 |
get_item_stock_purchase_params, add_oos_status_for_item, \
|
33 |
add_oos_status_for_item, get_oos_statuses_for_x_days_for_item, \
|
| 32 |
get_oos_statuses_for_x_days_for_item, get_non_zero_item_stock_purchase_params, \
|
34 |
get_non_zero_item_stock_purchase_params, \
|
| 33 |
get_billable_inventory_and_pending_orders,get_warehouse_name,get_amazon_inventory_for_item,get_all_amazon_inventory, \
|
35 |
get_billable_inventory_and_pending_orders, get_warehouse_name, \
|
| - |
|
36 |
get_amazon_inventory_for_item, get_all_amazon_inventory, \
|
| 34 |
add_or_update_amazon_inventory_for_item, update_reservation_for_order, \
|
37 |
add_or_update_amazon_inventory_for_item, update_reservation_for_order, \
|
| 35 |
get_last_n_day_sale_for_item, add_or_update_amazon_fba_inventory, add_update_hold_inventory,\
|
38 |
get_last_n_day_sale_for_item, add_or_update_amazon_fba_inventory, \
|
| - |
|
39 |
add_update_hold_inventory, get_amazon_fba_inventory, \
|
| 36 |
get_amazon_fba_inventory,get_all_amazon_fba_inventory, get_oursgood_warehouseids_for_location, \
|
40 |
get_all_amazon_fba_inventory, get_oursgood_warehouseids_for_location, \
|
| 37 |
get_holdinventorydetail_forItem_forWarehouseId_exceptsource, get_snapdeal_inventory_for_item, \
|
41 |
get_holdinventorydetail_forItem_forWarehouseId_exceptsource, \
|
| 38 |
add_or_update_snapdeal_inventor_for_item, get_nlc_for_warehouse,get_snapdeal_inventory_snapshot, \
|
42 |
get_snapdeal_inventory_for_item, add_or_update_snapdeal_inventor_for_item, \
|
| - |
|
43 |
get_nlc_for_warehouse, get_snapdeal_inventory_snapshot, \
|
| 39 |
get_held_inventory_map_for_item, get_hold_inventory_details, add_or_update_flipkart_inventory_snapshot, \
|
44 |
get_held_inventory_map_for_item, get_hold_inventory_details, \
|
| - |
|
45 |
add_or_update_flipkart_inventory_snapshot, get_flipkart_inventory_snapshot, \
|
| 40 |
get_flipkart_inventory_snapshot, get_flipkart_inventory_for_Item, get_oos_statuses_for_x_days, \
|
46 |
get_flipkart_inventory_for_Item, get_oos_statuses_for_x_days, \
|
| 41 |
get_all_vendor_item_pricing, get_state_master, update_snapdeal_stock_at_eod, update_flipkart_stock_at_eod, \
|
47 |
get_all_vendor_item_pricing, get_state_master, update_snapdeal_stock_at_eod, \
|
| - |
|
48 |
update_flipkart_stock_at_eod, get_wanlc_for_source, \
|
| 42 |
get_wanlc_for_source, get_all_available_amazon_inventory, _task_update_item_availability_cache, \
|
49 |
get_all_available_amazon_inventory, _task_update_item_availability_cache, \
|
| 43 |
add_vendor_item_pricing_in_bulk, add_inventory_in_bulk
|
50 |
add_vendor_item_pricing_in_bulk, add_inventory_in_bulk, \
|
| 44 |
|
51 |
get_item_pincode_availability
|
| 45 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
52 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
| 46 |
MissedInventoryUpdate, VendorItemMapping
|
53 |
MissedInventoryUpdate, VendorItemMapping
|
| 47 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
54 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
| 48 |
InventoryServiceException, WarehouseType, InventoryType, \
|
55 |
InventoryServiceException, WarehouseType, InventoryType, \
|
| 49 |
AvailableAndReservedStock
|
56 |
AvailableAndReservedStock
|
| 50 |
from shop2020.utils.Utils import log_entry, to_java_date
|
57 |
from shop2020.utils.Utils import log_entry, to_java_date
|
| - |
|
58 |
|
| 51 |
|
59 |
|
| 52 |
class InventoryServiceHandler:
|
60 |
class InventoryServiceHandler:
|
| 53 |
'''
|
61 |
'''
|
| 54 |
classdocs
|
62 |
classdocs
|
| 55 |
'''
|
63 |
'''
|
| Line 970... |
Line 978... |
| 970 |
def addInventoryInBulk(self, bulkInventoryList):
|
978 |
def addInventoryInBulk(self, bulkInventoryList):
|
| 971 |
try:
|
979 |
try:
|
| 972 |
add_inventory_in_bulk(bulkInventoryList)
|
980 |
add_inventory_in_bulk(bulkInventoryList)
|
| 973 |
finally:
|
981 |
finally:
|
| 974 |
close_session()
|
982 |
close_session()
|
| 975 |
|
- |
|
| 976 |
|
983 |
|
| - |
|
984 |
def getItemPincodeAvailability(self, itemIds, pin):
|
| - |
|
985 |
try:
|
| - |
|
986 |
get_item_pincode_availability(pin_code, itemPricingMap)
|
| - |
|
987 |
finally:
|
| - |
|
988 |
|
| - |
|
989 |
|
| 977 |
|
990 |
|