| Line 7... |
Line 7... |
| 7 |
from functools import partial
|
7 |
from functools import partial
|
| 8 |
from shop2020.clients.CatalogClient import CatalogClient
|
8 |
from shop2020.clients.CatalogClient import CatalogClient
|
| 9 |
from shop2020.clients.TransactionClient import TransactionClient
|
9 |
from shop2020.clients.TransactionClient import TransactionClient
|
| 10 |
from shop2020.model.v1.inventory.impl import DataService
|
10 |
from shop2020.model.v1.inventory.impl import DataService
|
| 11 |
from shop2020.model.v1.inventory.impl.Convertors import to_t_warehouse, \
|
11 |
from shop2020.model.v1.inventory.impl.Convertors import to_t_warehouse, \
|
| 12 |
to_t_itemidwarehouseid
|
12 |
to_t_itemidwarehouseid, to_t_state
|
| 13 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
13 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
| 14 |
ItemInventoryHistory, CurrentInventorySnapshot, VendorItemPricing, \
|
14 |
ItemInventoryHistory, CurrentInventorySnapshot, VendorItemPricing, \
|
| 15 |
VendorItemMapping, Vendor, MissedInventoryUpdate, BadInventorySnapshot, \
|
15 |
VendorItemMapping, Vendor, MissedInventoryUpdate, BadInventorySnapshot, \
|
| 16 |
VendorHolidays, ItemAvailabilityCache, \
|
16 |
VendorHolidays, ItemAvailabilityCache, \
|
| 17 |
CurrentReservationSnapshot, IgnoredInventoryUpdateItems, ItemStockPurchaseParams, \
|
17 |
CurrentReservationSnapshot, IgnoredInventoryUpdateItems, ItemStockPurchaseParams, \
|
| Line 1397... |
Line 1397... |
| 1397 |
|
1397 |
|
| 1398 |
def get_state_master():
|
1398 |
def get_state_master():
|
| 1399 |
stateIdNameMap = {}
|
1399 |
stateIdNameMap = {}
|
| 1400 |
statemaster = StateMaster.query.all()
|
1400 |
statemaster = StateMaster.query.all()
|
| 1401 |
for state in statemaster:
|
1401 |
for state in statemaster:
|
| 1402 |
stateIdNameMap[state.id] = state.name
|
1402 |
stateIdNameMap[state.id] = to_t_state(state)
|
| 1403 |
return stateIdNameMap
|
1403 |
return stateIdNameMap
|
| 1404 |
|
1404 |
|
| 1405 |
def update_snapdeal_stock_at_eod(allsnapdealstock):
|
1405 |
def update_snapdeal_stock_at_eod(allsnapdealstock):
|
| 1406 |
for stockitem in allsnapdealstock:
|
1406 |
for stockitem in allsnapdealstock:
|
| 1407 |
snapdealstockateod = SnapdealStockAtEOD()
|
1407 |
snapdealstockateod = SnapdealStockAtEOD()
|