| Line 27... |
Line 27... |
| 27 |
if __name__ == '__main__' and __package__ is None:
|
27 |
if __name__ == '__main__' and __package__ is None:
|
| 28 |
import sys
|
28 |
import sys
|
| 29 |
import os
|
29 |
import os
|
| 30 |
sys.path.insert(0, os.getcwd())
|
30 |
sys.path.insert(0, os.getcwd())
|
| 31 |
|
31 |
|
| 32 |
hotspot_store_url ='http://182.71.104.186/loaddetect/service.asmx?WSDL'
|
32 |
hotspot_store_url ='http://125.19.98.100/loaddetect/service.asmx?WSDL'
|
| 33 |
aclient = None
|
33 |
aclient = None
|
| 34 |
from_user = 'cnc.center@shop2020.in'
|
34 |
from_user = 'adwords@shop2020.in'
|
| 35 |
from_pwd = '5h0p2o2o'
|
35 |
from_pwd = 'adwords_shop2020'
|
| 36 |
to = ['rajveer.singh@shop2020.in','manish.sharma@shop2020.in']
|
36 |
to = ['kshitij.sood@shop2020.in','manish.sharma@shop2020.in']
|
| 37 |
pickup_stores = {}
|
37 |
pickup_stores = {}
|
| 38 |
pickup_stores_names = {}
|
38 |
pickup_stores_names = {}
|
| 39 |
|
39 |
|
| 40 |
def get_store_account_client():
|
40 |
def get_store_account_client():
|
| 41 |
global aclient
|
41 |
global aclient
|
| Line 45... |
Line 45... |
| 45 |
|
45 |
|
| 46 |
def process_store_orders_mismatch_data():
|
46 |
def process_store_orders_mismatch_data():
|
| 47 |
DataService.initialize('transaction','192.168.190.114')
|
47 |
DataService.initialize('transaction','192.168.190.114')
|
| 48 |
logistics_client = LogisticsClient().get_client()
|
48 |
logistics_client = LogisticsClient().get_client()
|
| 49 |
current_time = datetime.datetime.now()
|
49 |
current_time = datetime.datetime.now()
|
| 50 |
previous_time= current_time - datetime.timedelta(days=16)
|
50 |
previous_time= current_time - datetime.timedelta(days=35)
|
| 51 |
store_orders = Order.query.filter(Order.pickupStoreId> 0).filter(Order.cod==True).filter((Order.status == OrderStatus.DELIVERY_SUCCESS)).filter(Order.delivery_timestamp.between (previous_time,current_time))
|
51 |
store_orders = Order.query.filter(Order.pickupStoreId> 0).filter(Order.cod==True).filter((Order.status == OrderStatus.DELIVERY_SUCCESS)).filter(Order.delivery_timestamp.between (previous_time,current_time))
|
| 52 |
wbk = xlwt.Workbook()
|
52 |
wbk = xlwt.Workbook()
|
| 53 |
sheet = wbk.add_sheet('main')
|
53 |
sheet = wbk.add_sheet('main')
|
| 54 |
|
54 |
|
| 55 |
all_pickup_stores= logistics_client.getAllPickupStores()
|
55 |
all_pickup_stores= logistics_client.getAllPickupStores()
|