| Line 11... |
Line 11... |
| 11 |
to_t_provider, to_t_pickup_store
|
11 |
to_t_provider, to_t_pickup_store
|
| 12 |
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB, \
|
12 |
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB, \
|
| 13 |
get_shipment_info, initialize, get_logistics_estimation, get_provider, \
|
13 |
get_shipment_info, initialize, get_logistics_estimation, get_provider, \
|
| 14 |
get_providers, close_session, get_free_awb_count, get_holidays, is_alive, \
|
14 |
get_providers, close_session, get_free_awb_count, get_holidays, is_alive, \
|
| 15 |
get_provider_for_pickup_type, get_pickup_store, get_all_pickup_stores, \
|
15 |
get_provider_for_pickup_type, get_pickup_store, get_all_pickup_stores, \
|
| 16 |
get_pickup_store_by_hotspot_id
|
16 |
get_pickup_store_by_hotspot_id, get_destination_code
|
| 17 |
from shop2020.thriftpy.logistics.ttypes import LogisticsInfo, \
|
17 |
from shop2020.thriftpy.logistics.ttypes import LogisticsInfo, \
|
| 18 |
LogisticsServiceException, DeliveryType, PickUpType
|
18 |
LogisticsServiceException, DeliveryType, PickUpType
|
| 19 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
19 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
| 20 |
import datetime
|
20 |
import datetime
|
| 21 |
import math
|
21 |
import math
|
| Line 191... |
Line 191... |
| 191 |
try:
|
191 |
try:
|
| 192 |
try:
|
192 |
try:
|
| 193 |
dest_code = DataAccessor.serviceable_location_cache[providerId][pinCode][0]
|
193 |
dest_code = DataAccessor.serviceable_location_cache[providerId][pinCode][0]
|
| 194 |
return dest_code
|
194 |
return dest_code
|
| 195 |
except:
|
195 |
except:
|
| - |
|
196 |
try:
|
| - |
|
197 |
dest_code = get_destination_code(providerId, pinCode)
|
| - |
|
198 |
return dest_code
|
| - |
|
199 |
except:
|
| 196 |
raise LogisticsServiceException(101, "The pincode " + pinCode + " is not serviced by this provider: " + str(providerId))
|
200 |
raise LogisticsServiceException(101, "The pincode " + pinCode + " is not serviced by this provider: " + str(providerId))
|
| 197 |
finally:
|
201 |
finally:
|
| 198 |
close_session()
|
202 |
close_session()
|
| 199 |
|
203 |
|
| 200 |
def getFreeAwbCount(self, providerId, type):
|
204 |
def getFreeAwbCount(self, providerId, type):
|
| 201 |
"""
|
205 |
"""
|