Subversion Repositories SmartDukaan

Rev

Rev 9489 | Rev 9503 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9489 Rev 9495
Line 31... Line 31...
31
    get_billable_inventory_and_pending_orders,get_warehouse_name,get_amazon_inventory_for_item,get_all_amazon_inventory, \
31
    get_billable_inventory_and_pending_orders,get_warehouse_name,get_amazon_inventory_for_item,get_all_amazon_inventory, \
32
    add_or_update_amazon_inventory_for_item, update_reservation_for_order, \
32
    add_or_update_amazon_inventory_for_item, update_reservation_for_order, \
33
    get_last_n_day_sale_for_item, add_or_update_amazon_fba_inventory, add_update_hold_inventory,\
33
    get_last_n_day_sale_for_item, add_or_update_amazon_fba_inventory, add_update_hold_inventory,\
34
    get_amazon_fba_inventory,get_all_amazon_fba_inventory, get_oursgood_warehouseids_for_location, \
34
    get_amazon_fba_inventory,get_all_amazon_fba_inventory, get_oursgood_warehouseids_for_location, \
35
    get_holdinventorydetail_forItem_forWarehouseId_exceptsource, get_snapdeal_inventory_for_item, \
35
    get_holdinventorydetail_forItem_forWarehouseId_exceptsource, get_snapdeal_inventory_for_item, \
36
    add_or_update_snapdeal_inventor_for_item, get_nlc_for_warehouse,get_lastupdatedtime_for_snapdealinventory
36
    add_or_update_snapdeal_inventor_for_item, get_nlc_for_warehouse,get_snapdeal_inventory_snapshot
37
    
37
    
38
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
38
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
39
    MissedInventoryUpdate, VendorItemMapping
39
    MissedInventoryUpdate, VendorItemMapping
40
from shop2020.thriftpy.model.v1.inventory.ttypes import \
40
from shop2020.thriftpy.model.v1.inventory.ttypes import \
41
    InventoryServiceException, WarehouseType, InventoryType, \
41
    InventoryServiceException, WarehouseType, InventoryType, \
Line 816... Line 816...
816
        try:
816
        try:
817
            return get_nlc_for_warehouse(warehouse_id,item_id)
817
            return get_nlc_for_warehouse(warehouse_id,item_id)
818
        finally:
818
        finally:
819
            close_session()
819
            close_session()
820
            
820
            
821
    def getLastUpdatedTimeForSnapdealInventory(self):
-
 
822
        try:
-
 
823
            return get_lastupdatedtime_for_snapdealinventory()
-
 
824
        finally:
-
 
825
            close_session()
-
 
826
            
-
 
827
    def addOrUpdateAllAmazonFbaInventory(self,allamazonfbainventorysnapshot):
821
    def addOrUpdateAllAmazonFbaInventory(self,allamazonfbainventorysnapshot):
828
        try:
822
        try:
829
            for amazonfbainventorysnapshot in allamazonfbainventorysnapshot:
823
            for amazonfbainventorysnapshot in allamazonfbainventorysnapshot:
830
                add_or_update_amazon_fba_inventory(amazonfbainventorysnapshot)
824
                add_or_update_amazon_fba_inventory(amazonfbainventorysnapshot)
831
        finally:
825
        finally:
832
            close_session()
-
 
833
826
            close_session()
-
 
827
    
-
 
828
    def addOrUpdateAllSnapdealInventory(self,allsnapdealinventorysnapshot):
-
 
829
        try:
-
 
830
            for snapdealinventorysnapshot in allsnapdealinventorysnapshot:
-
 
831
                add_or_update_snapdeal_inventor_for_item(snapdealinventorysnapshot)
-
 
832
        finally:
-
 
833
            close_session()
-
 
834
            
-
 
835
    def getSnapdealInventorySnapshot(self):
-
 
836
        try:
-
 
837
            return get_snapdeal_inventory_snapshot()
-
 
838
        finally:            
-
 
839
            close_session()
-
 
840
                    
-
 
841
834
842