Subversion Repositories SmartDukaan

Rev

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

Rev 5527 Rev 5555
Line 5... Line 5...
5
'''
5
'''
6
 
6
 
7
from shop2020.logistics.service.impl import DataService
7
from shop2020.logistics.service.impl import DataService
8
from shop2020.logistics.service.impl.DataService import Awb, AwbUpdate, Provider, \
8
from shop2020.logistics.service.impl.DataService import Awb, AwbUpdate, Provider, \
9
     DeliveryEstimate, WarehouseAllocation, \
9
     DeliveryEstimate, WarehouseAllocation, \
10
    PublicHolidays, ServiceableLocationDetails
10
    PublicHolidays, ServiceableLocationDetails, PickupStore
11
from shop2020.thriftpy.logistics.ttypes import LogisticsServiceException,\
11
from shop2020.thriftpy.logistics.ttypes import LogisticsServiceException,\
12
    DeliveryType
12
    DeliveryType
13
from shop2020.utils.Utils import log_entry, to_py_date, to_java_date
13
from shop2020.utils.Utils import log_entry, to_py_date, to_java_date
14
from elixir import session
14
from elixir import session
15
import datetime, time
15
import datetime, time
Line 196... Line 196...
196
def is_alive():
196
def is_alive():
197
    try:
197
    try:
198
        session.query(Awb.id).limit(1).one()
198
        session.query(Awb.id).limit(1).one()
199
        return True
199
        return True
200
    except:
200
    except:
201
        return False
-
 
202
201
        return False
-
 
202
 
-
 
203
def get_all_pickup_stores():
-
 
204
    return PickupStore.query.all()
-
 
205
 
-
 
206
def get_pickup_store(storeId):
-
 
207
    return PickupStore.query.filter_by(storeId = id).one()
-
 
208
203
209