| Line 9... |
Line 9... |
| 9 |
from shop2020.clients.HelperClient import HelperClient
|
9 |
from shop2020.clients.HelperClient import HelperClient
|
| 10 |
from shop2020.clients.InventoryClient import InventoryClient
|
10 |
from shop2020.clients.InventoryClient import InventoryClient
|
| 11 |
from shop2020.config.client.ConfigClient import ConfigClient
|
11 |
from shop2020.config.client.ConfigClient import ConfigClient
|
| 12 |
from shop2020.model.v1.catalog.impl import DataService
|
12 |
from shop2020.model.v1.catalog.impl import DataService
|
| 13 |
from shop2020.model.v1.catalog.impl.CategoryManager import CategoryManager
|
13 |
from shop2020.model.v1.catalog.impl.CategoryManager import CategoryManager
|
| 14 |
from shop2020.model.v1.catalog.impl.Convertors import to_t_item, to_t_source
|
14 |
from shop2020.model.v1.catalog.impl.Convertors import to_t_item, to_t_source, \
|
| - |
|
15 |
to_t_brand_info
|
| 15 |
from shop2020.model.v1.catalog.impl.DataService import Item, ItemChangeLog, \
|
16 |
from shop2020.model.v1.catalog.impl.DataService import Item, ItemChangeLog, \
|
| 16 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
17 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
| 17 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
18 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
| 18 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
| 19 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
20 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
| Line 28... |
Line 29... |
| 28 |
from shop2020.utils.Utils import to_py_date, log_risky_flag
|
29 |
from shop2020.utils.Utils import to_py_date, log_risky_flag
|
| 29 |
from sqlalchemy import desc, asc
|
30 |
from sqlalchemy import desc, asc
|
| 30 |
from sqlalchemy.sql.expression import or_, distinct, func, and_
|
31 |
from sqlalchemy.sql.expression import or_, distinct, func, and_
|
| 31 |
from string import Template
|
32 |
from string import Template
|
| 32 |
import datetime
|
33 |
import datetime
|
| - |
|
34 |
import math
|
| 33 |
import sys
|
35 |
import sys
|
| 34 |
import threading
|
36 |
import threading
|
| 35 |
import urllib2
|
37 |
import urllib2
|
| 36 |
import math
|
- |
|
| 37 |
|
38 |
|
| 38 |
sourceId = int(ConfigClient().get_property("sourceid"))
|
39 |
sourceId = int(ConfigClient().get_property("sourceid"))
|
| 39 |
to_addresses = ["khushal.bhatia@shop2020.in", "chandan.kumar@shop2020.in", "chaitnaya.vats@shop2020.in"]
|
40 |
to_addresses = ["khushal.bhatia@shop2020.in", "chandan.kumar@shop2020.in", "chaitnaya.vats@shop2020.in"]
|
| 40 |
to_store_addresses = ["rajveer.singh@shop2020.in"]
|
41 |
to_store_addresses = ["rajveer.singh@shop2020.in"]
|
| 41 |
mail_user = "cnc.center@shop2020.in"
|
42 |
mail_user = "cnc.center@shop2020.in"
|
| Line 1525... |
Line 1526... |
| 1525 |
brandinfo.freebieItemId = brandInfo.freebieItemId
|
1526 |
brandinfo.freebieItemId = brandInfo.freebieItemId
|
| 1526 |
session.commit()
|
1527 |
session.commit()
|
| 1527 |
|
1528 |
|
| 1528 |
def get_brand_info():
|
1529 |
def get_brand_info():
|
| 1529 |
brandInfoMap = dict()
|
1530 |
brandInfoMap = dict()
|
| 1530 |
brandInfoList = FreebieItem.query.all()
|
1531 |
brandInfoList = BrandInfo.query.all()
|
| 1531 |
for brandInfo in brandInfoList:
|
1532 |
for brandInfo in brandInfoList:
|
| 1532 |
brandInfoMap[brandInfo.name] = to_t_brand_info(brandInfo)
|
1533 |
brandInfoMap[brandInfo.name] = to_t_brand_info(brandInfo)
|
| 1533 |
return brandInfoMap
|
1534 |
return brandInfoMap
|
| 1534 |
|
1535 |
|
| 1535 |
def update_store_pricing(tsp, allColors):
|
1536 |
def update_store_pricing(tsp, allColors):
|