Blame | Last modification | View Log | RSS feed
'''Created on Mar 10, 2016@author: amit'''from elixir import *from functools import partialfrom shop2020.clients.CatalogClient import CatalogClientfrom shop2020.clients.TransactionClient import TransactionClientfrom shop2020.model.v1.inventory.impl import DataServicefrom shop2020.model.v1.inventory.impl.Convertors import to_t_warehouse, \to_t_itemidwarehouseid, to_t_statefrom shop2020.model.v1.inventory.impl.DataService import Warehouse, \ItemInventoryHistory, CurrentInventorySnapshot, VendorItemPricing, \VendorItemMapping, Vendor, MissedInventoryUpdate, BadInventorySnapshot, \VendorHolidays, ItemAvailabilityCache, \CurrentReservationSnapshot, IgnoredInventoryUpdateItems, ItemStockPurchaseParams, \OOSStatus, AmazonInventorySnapshot, StateMaster, HoldInventoryDetail, AmazonFbaInventorySnapshot, \SnapdealInventorySnapshot, FlipkartInventorySnapshot, SnapdealStockAtEOD, FlipkartStockAtEOD, StockWeightedNlcInfofrom shop2020.thriftpy.model.v1.inventory.ttypes import \InventoryServiceException, HolidayType, InventoryType, WarehouseTypefrom shop2020.thriftpy.model.v1.order.ttypes import AlertTypefrom shop2020.thriftpy.purchase.ttypes import PurchaseServiceExceptionfrom shop2020.utils import EmailAttachmentSenderfrom shop2020.utils.EmailAttachmentSender import mailfrom shop2020.utils.Utils import to_py_date, to_java_datefrom sqlalchemy.orm.exc import MultipleResultsFound, NoResultFoundfrom sqlalchemy.sql import or_from sqlalchemy.sql.expression import and_, func, distinct, descfrom sqlalchemy.sql.functions import countimport calendarimport datetimeimport sysimport threadingimport math